New Posts New Posts RSS Feed: IdGenerator Problem
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

IdGenerator Problem

 Post Reply Post Reply
Author
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Topic: IdGenerator Problem
    Posted: 26-Apr-2011 at 3:08pm
Yes, indeed, just got it implemented today an it works great!
 
Greg
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 26-Apr-2011 at 2:44pm
Hi Greg,
 
Just trying to touch base and check if the suggestion above, resolved the issue.
 
Silvio.
Back to Top
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Posted: 22-Apr-2011 at 5:25am
Thank you, I will try that.
 
Greg
Back to Top
sbelini View Drop Down
IdeaBlade
IdeaBlade
Avatar

Joined: 13-Aug-2010
Location: Oakland
Posts: 786
Post Options Post Options   Quote sbelini Quote  Post ReplyReply Direct Link To This Post Posted: 19-Apr-2011 at 12:26pm
Hi Greg,
 
in your RPC method, have you tried the suggestion from the error message?
i.e.
 
  ...
  var options = new SaveOptions();
  options.FixupTempIds = FixupTempIds.InSaveListOnly;
  mgr.SaveChanges(entitiesToBeSaved, options);
 
Silvio.
 
Back to Top
gregweb View Drop Down
DevForce MVP
DevForce MVP
Avatar

Joined: 10-Sep-2009
Location: Clearwater, Fl
Posts: 253
Post Options Post Options   Quote gregweb Quote  Post ReplyReply Direct Link To This Post Posted: 14-Apr-2011 at 5:50pm
Every so often, I will get this error message:
 
IdGenerator problem - not all temp ids converted to permanent ids.
If you are using auto-incrementing ids check that the FixupTempIds SaveOption is set to InSaveListOnly.
 
If I ignore it, it seem to go away and everything seems to work ok.  This started recently after I changed the backend from MySQL to SqlServer.
 
I am using the usual Sql Server auto incrementing fields.
 
As per another post:
 
Here's a few places to look at:
- Check for partial saves; (i.e. SaveChangesAsync(listOfEntitiesToBeSaved) instead of SaveChangesAsync())
 
Not doing this.
 
- Check for multiple saves; (i.e. calling SaveChangesAsync() before a previous SaveChangesAsync() was completed)
 
The save is being done during the RPC and uses SaveChanges, not SaveChangesAsync();
 
- Check for server-side entity creation and saves (i.e. via any of the interceptors and/or RPC method)
This is true - I am creating a saving the entity on the server during an RPC call.
 
 
Greg


Edited by gregweb - 14-Apr-2011 at 5:57pm
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down