Hi,
is it possible to specify the type of a field in an embedded document using the @fieldTypes field?
I tried this:insert into myClass (myDate) values ({"date":"2013-01-01","@fieldTypes":"date=d"})
Now to check that internally the date field was a Date, I tried the following update:
update myClass increment myDate.date = 1
I was expecting a java.util.Date CastException, but I had:
Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: OSQLQuery [text=select from MYCLASS]
Error: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
It seems that internally the date field is a String not a Date.
Thanks