Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problems with creating EMBEDDEDLIST with next types: date, datetime, decimal #6901

Closed
1 of 5 tasks
habi4ek opened this issue Nov 10, 2016 · 2 comments
Closed
1 of 5 tasks
Assignees
Milestone

Comments

@habi4ek
Copy link

habi4ek commented Nov 10, 2016

OrientDB Version, operating system, or hardware.

  • v2.2.11

Operating System

  • Linux
  • MacOSX
  • Windows
  • Other Unix
  • Other, name?

Hi.
I have problems when I create EMBEDDEDLISTs with next types: date, datetime, decimal

Steps to reproduce the problem

orientdb {db=test}> create class eml
Class created successfully. Total classes in database now: 12.

orientdb {db=test}> create property eml.eml embeddedlist date
Property created successfully with id=1

orientdb {db=test}> create property eml.emldt embeddedlist datetime
Property created successfully with id=2.

orientdb {db=test}> create property eml.f embeddedlist float
Property created successfully with id=3.

orientdb {db=test}> create property eml.de embeddedlist Decimal
Property created successfully with id=4.

orientdb {db=test}> insert into eml content {"f":[5.1,3.1]}
Inserted record 'eml#21:0{f:[2]} v1' in 0,017000 sec(s).

orientdb {db=test}> select from eml
+----+-----+------+---------+
|# |@Rid |@Class|f |
+----+-----+------+---------+
|0 |#21:0|eml |[5.1,3.1]|
+----+-----+------+---------+
1 item(s) found. Query executed in 0.003 sec(s).

orientdb {db=test}> insert into eml content {"eml":["2016-10-09","2016-10-11"]}
Error: com.orientechnologies.orient.core.exception.ODatabaseException: Error during saving of record with rid #23:-1 DB name="test"
Error: com.orientechnologies.orient.core.exception.ODatabaseException: Error on saving record in cluster #23
DB name="test"
Error: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date

orientdb {db=test}> insert into eml content {"emldt":["2016-10-09 15:15:00","2016-10-11 10:10:00"]}
Error: com.orientechnologies.orient.core.exception.ODatabaseException: Error during saving of record with rid #24:-1 DB name="test"
Error: com.orientechnologies.orient.core.exception.ODatabaseException: Error on saving record in cluster #24
DB name="test"
Error: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Date

orientdb {db=test}> insert into eml content {"de":[5.1,3.1]}
Error: com.orientechnologies.orient.core.exception.ODatabaseException: Error during saving of record with rid #21:-1 DB name="test"
Error: com.orientechnologies.orient.core.exception.ODatabaseException: Error on saving record in cluster #21
DB name="test"
Error: java.lang.ClassCastException: java.lang.Double cannot be cast to java.math.BigDecimal

But if I create property embedded with link on this class, I can insert new record

orientdb {db=test}> create property eml.emClass embedded eml
Property created successfully with id=6.

orientdb {db=test}> insert into eml content {"emClass":{"@type":"d","@Class":"eml","de":[5.1,3.1],"emldt":["2016-10-09 15:15:00","2016-10-11 10:10:00"
], "eml":["2016-10-09","2016-10-11"] }}

Inserted record 'eml#21:1{emClass:eml{de:[2],emldt:[2],eml:[2]}} v1' in 0,021000 sec(s).

orientdb {db=test}> select from eml
+----+-----+------+---------+-----------------------------+
|# |@Rid |@Class|f |emClass |
+----+-----+------+---------+-----------------------------+
|0 |#21:0|eml |[5.1,3.1]| |
|1 |#21:1|eml | |eml{de:[2],emldt:[2],eml:[2]}|
+----+-----+------+---------+-----------------------------+
2 item(s) found. Query executed in 0.003 sec(s).

@lvca lvca added the bug label Nov 11, 2016
@tglman
Copy link
Member

tglman commented Nov 11, 2016

hi @Ivanov-Yuriy,

I just tryed the last released hotfix:2.2.12 and this seems already fixed, can you try to upgrate to te last hotfix ?

Regards

@habi4ek
Copy link
Author

habi4ek commented Nov 14, 2016

Hi @tglman
I checked latest hotfix 2.2.12. It works great. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

6 participants
@lvca @robfrank @tglman @habi4ek @prjhub and others