Print Page | Close Window

ExcludeFromPostSaveRefetch causing same record to be inserted twice

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3550
Printed Date: 28-Apr-2024 at 3:15pm


Topic: ExcludeFromPostSaveRefetch causing same record to be inserted twice
Posted By: agrogers
Subject: ExcludeFromPostSaveRefetch causing same record to be inserted twice
Date 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



Replies:
Posted By: kimj
Date 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.


Posted By: agrogers
Date Posted: 23-Jul-2012 at 4:22pm
OK, thanks for that info Kim.  We will see what we can do.


Posted By: agrogers
Date 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


Posted By: kimj
Date 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.



Print Page | Close Window