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

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -