locked
StoreGenerated not honored on Insert? RRS feed

  • Question

  • I have a n tier ET4 solution using Self Tracking Entities.
    When I do an Insert, the database supplies a default value for a field (SystemCreatedDate), so in the model I marked it as StoreGenerated.
    However, it still appears in the INSERT statement that is generated.
    What else do I need to do?

    Friday, December 4, 2009 5:28 PM

Answers

  • In Beta2, changing the StoreGeneratedPattern (SGP) in the model does not affect the store model. We have fixed this post-Beta2. For now, you'll need to edit the SSDL section of the EDMX file by hand and set the SGP there. Do note that the update model wizard overwrites your SSDL, though. Hence the post-Beta2 fix.

    HTH,
     Noam


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, December 4, 2009 7:17 PM
    Moderator

All replies

  • In Beta2, changing the StoreGeneratedPattern (SGP) in the model does not affect the store model. We have fixed this post-Beta2. For now, you'll need to edit the SSDL section of the EDMX file by hand and set the SGP there. Do note that the update model wizard overwrites your SSDL, though. Hence the post-Beta2 fix.

    HTH,
     Noam


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, December 4, 2009 7:17 PM
    Moderator
  • Thanks, it worked! When is the next fix scheduled to be released?
    Monday, December 7, 2009 11:34 PM