Closed TimMensch closed 1 month ago
Hmm, I can reproduce this. It seems the timestamp in the first case is the creation date of the property, not the vertex.
Could you try:
CREATE PROPERTY Test.createdAt IF NOT EXISTS DATETIME (mandatory true, readonly, DEFAULT `sysdate()`);
this seems to work for me.
OK, sure, that works. Thanks.
I guess the docs are not clear on this point. I found this example that is misleading:
ArcadeDB> CREATE PROPERTY Employee.hiredAt DATETIME (readonly, default sysdate('YYYY-MM-DD HH:MM:SS'))
Ok, I haven't seen this from @gramian https://github.com/ArcadeData/arcadedb/pull/1611. Now it should be fixed.
ArcadeDB Version:
v24.4.1 (build c714a4f5c827d742d6edd0f7788fe049bc63607b/1713579699346/main)
OS and JDK Version:
Running on Linux 5.15.146.1-microsoft-standard-WSL2 - OpenJDK 64-Bit Server VM 11.0.22 (Temurin-11.0.22+7)
Expected behavior
Setting
DEFAULT sysdate()
during create should be identical to addingDEFAULT sysdate()
during ALTER PROPERTY.Actual behavior
When I say:
The three vertices all have the same createdAt field. Whereas if I say:
Then
...creates vertices with three unique timestamps.
I'm using the Docker Hub image version 24.4.1.
Originally posted by @TimMensch in https://github.com/ArcadeData/arcadedb/issues/905#issuecomment-2118528446