Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OrientDB POJO mapping with embedded objects

Tags:

java

orm

orientdb

When using the Object Database of OrientDB, how can I tell the database, that in my POJO the reference to another custom object or to a list of other custom objects should be stored in the embedded way and not with links. It seems that by default, OrientDB tries to store them in separate documents, which is unnecessary in my case.

like image 564
dkaisers Avatar asked Sep 30 '14 10:09

dkaisers


1 Answers

You need mark your embedded list with javax.persistence.Embedded annotation

@Embedded
List<YourEmbeddedClass> yourobjects;
like image 81
zella Avatar answered Sep 21 '22 17:09

zella