DateTime Default not working correctly
Re: DateTime Default not working correctly
The Auto-Sync value (Never / OnInsert / OnUpdate / Always) specifies if the property is automatically synchronized. Depending on the target database server, synchronization is done via the RETURNING clause or separate SELECT in the generated SQL statement. You can check this via dbMonitor.
-
- Posts: 79
- Joined: Tue 02 Jun 2015 18:22
Re: DateTime Default not working correctly
I sitll would like to see a detailed explanation of AutoSync.
I set AutoGenerated = true and AutoSynch to OnInsert since I don't understand exactly what this value does, and my database constraints require the modified date not be null.
I set AutoGenerated = true and AutoSynch to OnInsert since I don't understand exactly what this value does, and my database constraints require the modified date not be null.
OutOfTouch6947 wrote:I didn't set the AutoGeneratedValue or Auto-Snc.
Where can I find an detailed explanation of AutoSync Mode?
Shalex wrote:1. Did you set the following attributes for your CreatedDate and ModifiedDate properties in *.lqml?OutOfTouch6947 wrote:Here is the insert statement with the CreatedDate and ModifiedDate added back into the models and the values are not defaulting correctly in the backend, so the model must be passin in some junk value. [...]
CreatedDate: AutoGeneratedValue=True, Auto-Sync=OnInsert
ModifiedDate: AutoGeneratedValue=True, Auto-Sync=OnUpdate
2. Specify (via dbMonitor) the values of parameters used in the INSERT statement for "CreatedDate" and "ModifiedDate" columns.
3. Send us a small test project with the corresponding DDL/DML script for reproducing the issue in our environment.
Re: DateTime Default not working correctly
Please refer to our response on Tue May 23, 2017 in this thread.OutOfTouch6947 wrote:I sitll would like to see a detailed explanation of AutoSync.
With these settings, the date value should be generated in the database (via default value of column, via trigger, etc), then it will be returned to your program via RETURNING clause or separate SELECT statement.OutOfTouch6947 wrote:I set AutoGenerated = true and AutoSynch to OnInsert since I don't understand exactly what this value does, and my database constraints require the modified date not be null.
If this doesn't help, please upload a small test project with the corresponding DDL/DML script for reproducing to our ftp server (ftp://ftp.devart.com, credentials: anonymous/anonymous ) or to any file exchange server so that we could download it from there.
-
- Posts: 79
- Joined: Tue 02 Jun 2015 18:22
Re: DateTime Default not working correctly
Thanks for the info.