CodeSmith Community
Your Code. Your Way. Faster!

DeepSave() Issue

Latest post 10-08-2007 10:55 PM by Ragnor. 0 replies.
  • 10-08-2007 10:55 PM

    • Ragnor
    • Not Ranked
    • Joined on 09-06-2007
    • Posts 3
    • Points 15

    DeepSave() Issue

    When I deep load a UserRole entity then do a bunch of processing setting various properties including changing the UserID (which is a foreign key reference to my User entity) then deep save my UserRole, the UserID reverts to the UserIDSource value for UserID instead of what I've set it too.

     Example

    UserRoleService userRoleService = new UserRoleService() ;

    UserRole userRole = service.GetByUserID(userID);

    service.DeepLoad(userRole );

    // at this point UserIDSource.UserID = 1

    // do some stuff

    userRole.UserID = newUserID;  // eg #2

    // do some other stuff 

    service.DeepSave(userRole);

     // at this point userRole.UserID = 1 again :(

     

     

    • Post Points: 5
Page 1 of 1 (1 items) | RSS
Copyright © 2008 CodeSmith Tools, LLC
Powered by Community Server (Commercial Edition), by Telligent Systems