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 think you need to be able to choose identity type when setting "Auto Through Entity". We're using GUID as our primary Identity Type, and the context has guid as method set. This doesn't work very well when choosing auto through, since it seems to be expecting keytable and int. Or am I missing something?
|
|
|
Auto through entities always end up with the Int32 identity type and the Default identity method, i.e. the one you set on your LightSpeedContext. Check that your LightSpeedContext.IdentityMethod is set to Guid (it defaults to KeyTable). We don't plan to support overriding the context identity type. We prefer not to see entity-level identity methods even on full entities, so definitely don't want to offer it on auto entities (unless at some point we promote auto entities to support the full range of entity features anyway). However setting the identity type does seem useful and I'll log a feature request for this. In the meantime, just convert the auto through entity to a "visible" entity -- you can do this by right-clicking the through association arrow and choosing Convert to Explicit Through Entity. |
|
|
If I could change the Identity Type on auto-through this would work very well, since I'm able to select method on other entities. However, why not change this a bit and make the identity method associative; let us specify a default method for the various identity types used in the model? I think that would be a cool solution :)
|
|
|
That would be a cool solution, but we'd need to think about how to extend IdentityMethod to handle it. (At the moment, IdentityMethod is an enum so it can't express associations. We could add an IdentityMethod.Custom and an IIdentityMethodStrategy interface, like we did for AutoTimestampMode.) I've logged a feature request for this, but because it's a "nice to have" we will have to prioritise it on the basis of demand. |
|