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
|
Hello If entity "Department" has a collection of "Employee" entities, is it possible to have a column on "Department" called EmployeeCount that automatically does a "select count(id) from employee" ie. an calculated column? Hopes that makes sense :-) Regards Bjarne |
|
|
Do you mean a computed column in the database that gets loaded as an entity property in LightSpeed? If so, yes: just mark the LightSpeed field as Load Only in the designer (or readonly in C#) so we don't try to save it back to the database. However, we can't create such a column from designer-database sync. Nor is there a built-in migrations API for computed columns, though you can do it from migrations using ExecuteNativeCommand. |
|
|
OK ... that was kind of a "doh ..." moment. That is of course the easy way to do it :-) Thanks Ivan |
|