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
|
This morning I decided to use the Visual Designer to create my entities first and then push the changes to the database. Right now all you have is the option to Add Entity Property when adding a property and it seems like it might be useful to have pre-built options for adding LockVersion, CreatedOn, and UpdatedOn so I don't have to remember the settings. This is especially useful since you don't appear to display these properties on the VisualDesigner and hence I can't see their settings. The other thing I was thinking about is for my own conventional properties. I might add an "Email" Property to a lot of entities with the same settings. Would be nice if I could somehow add my own pre-built properties and their settings so that I can save myself a little time and keep consistency by just choosing to add an Email Property. I assume this would also help with inheritance and moving properties to base classes, etc. since entity properties probably have to be identical in every way in order for the properties to be moved along the inheritance chain. Not sure if this makes sense, but I see this being a huge time saver and benefit of using the Visual Designer. Regards, Dave
|
|
|
When I attempted to update the database with the new entity I received an error that "CreatedOn must be nullable" or something to that effect. My guess is that there are a few bugs when adding new entities ( tables ) to the database, because the documentation explicitly calls for that column to be non-nullable. Would love to be more model-centric and push changes to the database if possible. Regards, Dave
|
|
|
The "special columns" are available through the visual designer: select the entity, go to the Properties grid and look for the Track Create Time, Track Update Time, Optimistic Concurrency Checking and Soft Delete properties. Conventional properties are an interesting idea, and I've logged a feature request for them -- thanks for the suggestion! |
|
|
We have some limitations at the moment around adding non-nullable columns, because of potential issues with existing rows. I have to admit we are a bit inconsistent about this -- sometimes we conservatively go "hmm, better not even try," sometimes we just give it a go and let the database decide whether it can do it or not (e.g. it is usually okay if the table is empty, but will often raise an error if the table is nonempty). I'll take a look and see if we can improve this. |
|
|
Ah, I get it now. I didn't realize that setting those properties to true would auto-generate the field. Nice idea. I am still getting the error: SQL Server cannot add column CreatedOn unless it is made nullable but I believe I remember reading somewhere else that this was a known error.
Thanks, Dave
|
|