java - Hibernate many-to-many produces null member -


i have 2 entity classes many-to-many relation on there fields. here are:

public class tcustomerprofile { ... @manytomany(fetch = fetchtype.eager, cascade = {cascadetype.persist, cascadetype.merge},mappedby = "customers") private list<tuserprofile> users; ... } public class tuserprofile{ ... @jointable(name = "t_user_authorization",          joincolumns = {@joincolumn(name = "user_id" ,referencedcolumnname ="user_id")/*,@joincolumn(name = "entity1" ,referencedcolumnname ="entity")*/ },          inversejoincolumns = { @joincolumn(name = "customer_id" ,referencedcolumnname ="customer_id")/*,@joincolumn(name = "entity" ,referencedcolumnname ="entity")*/} ) @manytomany(fetch = fetchtype.eager) private list<tcustomerprofile> customers; ... } 

now question:
how possible 1 of users in tcustomerprofile.users null?
data combination in 3 tables (including join table t_user_authorization) results in this?


Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -