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
|
I dont know if I am blind but it seems in LS3 that the IdentityMethod Property is gone from the Designer for individual entities. How do I now set the IdentityMethod for individual Identities? I have a model with mostly IdentityColumns and some Guids
|
|
|
This is a problem scenario for us -- we want people to use the LightSpeedContext.IdentityMethod as the default, and override the identity method at the entity level only when absolutely needed. In the 2.x designer, however, the entity Identity Method was highly visible, whereas the context identity method was completely invisible. So we found people were specifying the identity method on every single entity individually. For 3.x, therefore, we decided to try hiding the entity Identity Method in order to discourage people from setting it and encourage use of the context identity method. The entity Identity Method setting is still there, but there is no longer a UI for setting it. Instead, you have to open the .lsmodel file as XML (right-click in Solution Explorer > Open With > XML Editor) and set the identityMethod attribute: <entity name="..." identityMethod="Guid"> We know this is inconvenient for people like you who have legitimate reasons for using a per-entity identity method, and we're open to feedback on making this option visible again, ideally in a way which doesn't encourage people to use it when they don't need it. |
|
|
At first I was hoping that LS3 had some smarts in it to differentiate an IdentityColumn from a Guid But I guess enough of the IdentityMethods rely on an int or long it would be hard do differentiate. I cant seem to think of a way to make this available without making it easy to set. If you have multiple things that fall under the same criteria as options but not recomended then I would group them together in a separate dialog available from the designer as Advanced Options. Then flag the dialog with a note that these are advanced options for special situations and not recomended for modification unless you know what you are doing etc....
|
|
|
This is going to drive me insane in very little time. I have a 15 year old database with multiple identity methods. If I wanted to be writing xml, I would be using nhibernate. I don't know what the best answer is, but hiding options (to the point where I have to go online to find out how to set it) is not it.
|
|
|
Okay, well between the two of you I guess the people have spoken on that particular effort. We will continue to look for a way to make this less inviting to people who don't need it, so this may change again, but for the time being I've re-enabled entity-level Identity Method in the designer UI. This will be available in nightly builds dated 12 Jan 2010 and above, available after about 1500 GMT. |
|
|
Thanks. I'll grab it tomorrow. |
|