Use @id annotation.
In order to use optimistic transactions, you would also need version field
import javax.persistence.Id;
import javax.persistence.Version;
@Id
private String id;
@Version
private Long version;
суббота, 9 мая 2015 г., 1:53:58 UTC+6 пользователь Ludger Peters написал:
>
> I currently have a pojo class that a bind to orient db using something
> like:
>
> OObjectDatabaseTx db = new OObjectDatabaseTx
> ("remote:localhost/petshop").open("admin", "admin");
> // REGISTER THE CLASS ONLY ONCE AFTER THE DB IS OPEN/CREATED
> db.getEntityManager().registerEntityClasses("foo.domain");
>
> how would i bind a id, i tried using rid, @id but it did not work. Any
> hints on how to bind the id to my pojo?
>
--
---
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.