Hi Wagner,
Another (probably newbie) question:
I have a table with a GUID ID and some ** REQUIRED ** Integer fields. For each Integer field I specify a default value in the Data Modeler. This produces a (SQLite) script with all defaults set correctly.
Also after browsing this forum, it appears that the generated entities (objects) do not handle defaults (i.e. there is no such attribute). When I insert & post a record in the database (i.e. not using Aurelius), all fields are set correctly to their default value. However, if I create a new Entity and immediately persist it through the Object Manager (** without touching any of the Integer fields **), the record is indeed inserted but with ALL Integer fields set to 0! This essentially by-passes a database rule!
Is this caused by the default property value being 0 and it being included in the Insert SQL? Only if the field is NOT Required (Nullable<Integer> property), its value defaults to NULL and the field can be excluded from the Insert SQL? Is setting default values in code (e.g. Dataset.OnNewRecord) the only - or even the required - option in such a case?
I hope my question makes sense. If not, I'll gladly explain further.
Regards,
Mark