In Hibernate OneToMany mapping -
what have specify in optional element "mappedby".is table_name of specific model or classname?
which correct?
this
@onetomany(orphanremoval=true,fetch = fetchtype.lazy,mappedby = "adminuser") private list sessions;
or this.....?
@onetomany(orphanremoval=true,fetch = fetchtype.lazy,mappedby = "admin_user") private list sessions;
if relationship bidirectional, mappedby
element must used specify relationship field or property of entity owner of relationship.
Comments
Post a Comment