java - Hibernate storing identifiers of another entities not whole entities? -


i'm building restful service on java using jersey , need implement relationships between entities storing identifier on entity not whole. there way implements in hibernate?

i'm using not working.

@entity @javax.persistence.table(name = "manager_user") public class manageruser extends user {      @manytoone(targetentity = shopadminuser.class)     private integer shopadminuserid; //... }   @entity @javax.persistence.table(name = "shop_admin_user") public class shopadminuser extends user {      @lob     private string contactdata;      public string getcontactdata() {         return contactdata;     }      public void setcontactdata(string contactdata) {         this.contactdata = contactdata;     } }   @entity @inheritance(strategy= inheritancetype.table_per_class) public abstract class user {      @id     @generatedvalue(strategy = generationtype.table)     private integer id;  //... } 

it comfortable me implement this.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -