Editable Root question

Editable Root question

Old forum URL: forums.lhotka.net/forums/t/2250.aspx


wjcomeaux posted on Wednesday, January 31, 2007

How would I generate an Editable root object based on a table that has both a primary key (ID) and a unique index (User_ID) and let the User_ID property in the business object be settable.

Right now, CodeSmith is giving me a business object with only a ReadOnly User_ID property. What would be the best way to get around this? I obviously don't want to remove the uniqueness of User_ID from my database as then we could have multiple records for a user and we don't want that.

Thanks for the input,
Will

Tray replied on Monday, February 12, 2007

Hi Will,

Having a unique key that is settable seams to point in the direction of the 'ExistsCommand'.

See how you go.

Regards,
Tray

Copyright (c) Marimer LLC