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
|
Hi, I want to be able to set default values for all models for the following properties: "Identity Type", "Identity Method", "Track Create Time" and "Track Update Time". This would be a great time saver. Johan |
|
|
Nice idea. You say "all models" which suggests these should be global settings rather than per-model settings. The trouble with global settings is that they are per-user (and I think per-machine as well) -- they don't travel with the model. So you were on a team with someone who had different defaults from you, they could be adding entities that defaulted to Guid/Guid while you were defaulting to Int32/KeyTable. What do you think is better -- per-user defaults or per-model defaults? (I suppose we could have 'per-user defaults that set the per-model defaults for new models, which then travel with the model,' but this seems like a recipe for bafflement...!) |
|
|
Per model default would be better it will eliminate the bafflement :) Everyone can then check the model to see what the defaults is, and it's not configured somewhere in the user settings.
|
|
|
Per-model it is. This will be in tonight's nightly build. To set up the defaults, go into the LightSpeed Model Explorer (the tree view), right click the model and choose Add New Defaults Policy. You'll see a Defaults Policy node appear in the new Policies folder. Select it and set up the defaults you want. Note that defaults apply only during entity creation -- if you change the defaults, existing entities *won't* be updated. I haven't provided a way to default Identity Method, because we encourage people to set their identity method context-wide in the LightSpeedContext rather than individually on each entity. The Identity Method for an individual entity should be only for those rare cases where you need different methods for different entities for compatibility with an existing schema (e.g. most tables use integers but a few use GUIDs), and this situation doesn't arise in model-first. Of course we're open to discussion on this if there's a compelling use case. Let me know if you need me to add things like soft delete and optimistic concurrency checking, and of course if you find any bugs or hit any problems. |
|
|
Excellent, I agree that the Identity Method should be set on the LightSpeedContext. Will this also be in v4.0? If you can add soft delete and optimistic concurrency that would be greate now that you have the default policy.
Johan |
|
|
It will be in 4.0 RTM. I'm not sure how quickly we can get it folded into the betas. Soft delete and optimistic concurrency checking are done and will be in the nightly. |
|
|
Greate, thank you very much. Not to worry about the v4.0.
Cheers Johan |
|