[2.0.3] Register Entity Classes

Skip to first unread message

Андрей Гришин

Feb 23, 2015, 7:57:31 AM2/23/15
to orient-...@googlegroups.com

I little bit confused while trying to register my entities classes.

I have my POJOs structure, which i need to bind, like this:

public class SliderEntity extends OEntity {
private double min;
private double max;
private double value;
private String style;
private transient BigDecimal trans;

public class ODateSignature {
private Date datetime;

public abstract class OEntity {
private String name;
private ODateSignature signature;
private List<OEntity> versions;
private Object version;

Next step i connected to database and tried to:


...and then, when i tried to save my object, i've got error:

com.orientechnologies.orient.core.exception.OSerializationException: Linked type [class org.orient.store.object.ODateSignature:23.02.15 12:16] cannot be serialized because is not part of registered entities. To fix this error register this class

As i inderstood next, i can try to do:

database.getEntityManager().registerEntityClasses(SliderEntity.class, true); // register my entities recursively

but after this, apart from error above, saving my object occurs in issue, where i have database scheme structure like this:

So, i saw that transient field "trans" was registered, which i really do not need to store in database, and also my ODataSignature still was not registered for binding.
Please, tell me, am I understand something wrong or this are bugs?


Reply all
Reply to author
0 new messages