This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hello: We have the situation where we have 'master data' and 'working data' tables. Entities in the 'working data' tables make their way through a QA process and are eventually copied into the 'master data' tables. Ideally, we could like the Id of the Entity in the 'working data' tables be equal to the Id in the 'master data' tables. I realize this goes against the global database Id uses LightSpeed recommends but is it possible to gain access or create an Entity uses a manual Id? Here's an example of what I'd like to accomplish: Can I make an extension method or something to gain access to the Id property as it is currently read-only. |
|
|
You cannot modify the Id, but you can override the GeneratedId() method so that when LightSpeed first allocates the Id for a new entity, it will use your chosen Id instead of an autogenerated one. See http://www.mindscape.co.nz/products/lightspeed/Help/Help%20Topics/LightSpeed/IdentityGeneration.html for info and http://www.mindscape.co.nz/forums/Thread.aspx?PostID=10932 or http://www.mindscape.co.nz/forums/Thread.aspx?PostID=12072 for a couple of examples. |
|
|
Thanks for the prompt response Ivan, I'll look into the examples you posted. |
|