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

ODocument.toMap() not copy all fields #6871

Closed
4 tasks
schernolyas opened this issue Nov 2, 2016 · 2 comments
Closed
4 tasks

ODocument.toMap() not copy all fields #6871

schernolyas opened this issue Nov 2, 2016 · 2 comments
Assignees

Comments

@schernolyas
Copy link

schernolyas commented Nov 2, 2016

OrientDB Version, operating system, or hardware.

  • v2.0 SNAPSHOT[ ] - .18[ ] .17[ ] .16[ ] .15[ ] .14[ ] .13[ ] .12[ ] .11[ ] .10[ ] .9[ ] .8[ ] .7[ ] .6[ ] .5[ ] .4[ ] .3[ ] .2[ ] .1[ ] .0[ ]
  • v2.1 SNAPSHOT[ ] - .16[ ] .15[ ] .14[ ] .13[ ] .12[ ] .11[ ] .10[ ] .9[ ] .8[ ] .7[ ] .6[ ] .5[ ] .4[ ] .3[ ] .2[ ] .1[ ] .0[ ]
  • v2.2 SNAPSHOT[ ] - .rc1[ ] .beta2[ ] .beta1[ ]12

Operating System

  • Linux
  • MacOSX
  • [ x] Windows
  • Other Unix
  • Other, name?

Expected behavior and actual behavior

aa [main] 12:34:51,599 DEBUG org.hibernate.ogm.datastore.orientdb.dialect.impl.ODocumentListTupleIterator: tuple json: {"@type":"d","@rid":"#25:0","@ve
rsion":1,"@class":"Customer","bKey":1,"createdDate":"2016-11-02 00:00:00","blocked":"N","name":"test","status":"VIP","@fieldTypes":"bKey=l,createdDate=
t"}
aa [main] 12:34:51,599 DEBUG org.hibernate.ogm.datastore.orientdb.dialect.impl.ODocumentListTupleIterator: tuple map: {bKey=1, createdDate=Wed Nov 02 0
0:00:00 MSK 2016, @rid=#25:0, @class=Customer, blocked=N, name=test, status=VIP}

Method toJSON copy to JSON all fields, but method toMap not copy '@Version' field

Steps to reproduce the problem

@tglman
Copy link
Member

tglman commented Nov 2, 2016

hi @schernolyas,

This is on purpose, the toMap just extract the values of the document, to get the other information you need to use the ODocument api, doc.getVersion() ,doc.getIdentity() and doc.getSchemaClass() | doc.getClassName(), hope this help

Bye

@schernolyas
Copy link
Author

Hi @tglman !

I think that it is not logical .... But if it is feature ...

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

No branches or pull requests

4 participants