Hi all,

Last question for today: why does the following work:

OClass book = db.getMetadata().getSchema().createClass("Book");
book.createProperty("title", OType.STRING);

db.getEntityManager().registerEntityClass(Book.class);


While this doesn't?


db.getEntityManager().registerEntityClass(Book.class);


OClass book = db.getMetadata().getSchema().createClass("Book");     // <-- 
fails, because Book already exists
book.createProperty("title", OType.STRING);

Why is there no error when I create a class, and then register the entity, but 
when I register the entity, which apparently also creates a class, then 
creating a class is a problem. 


This seems confusing, and I didn't find any documentation why this could be, so 
if there's a good reason, I'd love to know! I'm just trying to understand 
OrientDB.


Thanks!


Erik


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to