New Posts New Posts RSS Feed: Negative temporary ID inserted as into Identity Column... Why?
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Negative temporary ID inserted as into Identity Column... Why?

 Post Reply Post Reply
Author
brentvee View Drop Down
Newbie
Newbie


Joined: 22-Jul-2008
Location: RSA
Posts: 2
Post Options Post Options   Quote brentvee Quote  Post ReplyReply Direct Link To This Post Topic: Negative temporary ID inserted as into Identity Column... Why?
    Posted: 22-Jul-2008 at 11:05pm
Hey Guys

We have been using IdeaBlade for the last 2 years and are still a very happy users. :)

Recently though we have been having a problem with what we think might be the framework, and cannot seem to fix it.
We create an entity as we have always done using CreateEntity<> on the persistence manager. When calling SaveChanges() on the persistence manager though, the temporary ID assigned to this entity (which is -100) is inserted into the Identity column in the table. According to a sql trace, IdeaBlade does not seem to request a next available ID from the database.

To try and isolate the problem, we use the same section of code in a test project, and this time the ID is requested. So the difference between the two cases, is that in the test, the persistence manager being used is the default manager and in the above case, the persistence manager is being instantiated with a specific data source key extension, and a custom DataSourceKeyResolver is being used. To our knowledge, we have not yet had any problems when using a custom DataSourceKeyResolver, so I dont think we are doing anything incorrect there. The problem is simply that IdeaBlade is not requesting a next available ID from the database.

Any help will be greatly appreciated as this small problem is giving us alot of downtime with development.

Regards
Brent
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down