dkaisers
dkaisers

Reputation: 844

OrientDB POJO mapping with embedded objects

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.

Upvotes: 6

Views: 931

Answers (1)

zella
zella

Reputation: 4685

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

@Embedded
List<YourEmbeddedClass> yourobjects;

Upvotes: 5

Related Questions