New Posts New Posts RSS Feed: ExcludeFromPostSaveRefetch causing same record to be inserted twice
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

ExcludeFromPostSaveRefetch causing same record to be inserted twice

 Post Reply Post Reply
Author
agrogers View Drop Down
Groupie
Groupie
Avatar

Joined: 11-Mar-2010
Posts: 41
Post Options Post Options   Quote agrogers Quote  Post ReplyReply Direct Link To This Post Topic: ExcludeFromPostSaveRefetch causing same record to be inserted twice
    Posted: 22-Jul-2012 at 6:33am
Hi

We have discovered recently that when a record is persisted and not refetched Ideablade attempts to insert the record a second time.  Of course this fails with a PrimaryKey violation.  Debugging this shows that the row state of the newly inserted record does not change hence the reason a second attempt is made to insert the record.

Is this  expected behaviour?  Or are we doing something wrong?  Is there a way to get around this?  

Thanks
Andrew
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 23-Jul-2012 at 10:23am
Hi Andrew,
 
This is a bug.  Unfortunately, there's not a reliable workaround.  In some cases you might be able to call AcceptChanges on the entity, but if the entity has an identity column or any other store-generated values, it will be much safer to not exclude the entity.
Back to Top
agrogers View Drop Down
Groupie
Groupie
Avatar

Joined: 11-Mar-2010
Posts: 41
Post Options Post Options   Quote agrogers Quote  Post ReplyReply Direct Link To This Post Posted: 23-Jul-2012 at 4:22pm
OK, thanks for that info Kim.  We will see what we can do.
Back to Top
agrogers View Drop Down
Groupie
Groupie
Avatar

Joined: 11-Mar-2010
Posts: 41
Post Options Post Options   Quote agrogers Quote  Post ReplyReply Direct Link To This Post Posted: 24-Jul-2012 at 5:23am
Oh, Kim one other question.  When do you expect the next release of IdeaBlade Classic to come out?  We are not really looking for new features in IdeaBlade but we use the DevExpress controls and i understand that we should only use the version of their controls that is matched with your release.  There are bug fixes in the DevExpress controls that we do need and so I am keen to keep up to date with what they have available.

Thanks
Andrew
Back to Top
kimj View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 09-May-2007
Posts: 1391
Post Options Post Options   Quote kimj Quote  Post ReplyReply Direct Link To This Post Posted: 24-Jul-2012 at 8:39am
The plan is for the next release of Classic to include support for DevEx 12.1, Infragistics 12.1, and VS 2012.  We don't yet have a release date set, since it's mostly customer demand that drives the support of Classic these days.  Since you guys need the latest DevEx controls we'll get this on the schedule, and I'd guesstimate a release date sometime in September at the earliest.   You might want to contact your account rep too, to make sure we know your needs and schedule.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down