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 guys, Just checking... In the documentation, under the Conventions section:
When I select an entity and switch on Track Create Time and Track Update Time and update the database, two new columns were created: CreatedOn and UpdatedOn. However, neither fields have default value set to =GetDate(). Is this by design? Cheers Joseph
|
|
|
I believe LightSpeed will populate these columns automatically when you save the entity, so it isn't technically necessary for the columns to be defaulted in the database (and we therefore don't do it in the designer for reasons of simplicity). Nobody has reported any problems due to the columns not being defaulted, so I reckon the documentation is indeed being over-prescriptive. We'll try to get that amended -- thanks for pointing it out. |
|
|
Hope I don't sound like nitpicking... As my Int64.MaxValue might have sounded ;-) --- By the way, The Conventions section is really great, it would be even better if there are more articles like that in the help file. |
|
|
Hi Ivan, I was just thinking today, what you guys have put in the Convention document is almost correct. From the designer and a developer's application's point of view, it is unnecessary to have those defaults. However, from database insert scripts, it would be handy to have things like CreatedOn/UpdatedOn default to GetDate() and LockVersion default to 0. It would be nice if this happen automatically when Update Database from the designer. Cheers Joseph |
|
|
That does make sense. It might also help with adding these columns to tables that already contain existing entities. I've logged a feature request for it but can't make any promises on priority -- it sounds like this isn't a pain point for you at the moment, but if it is then let us know and we'll bump it. |
|
|
This is not a pain point, just a rough edge waiting to be polished ;-) |
|