• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Relations

 
Slavko Glisic
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please, can any one help me to resolve this relation:

I have Classroom class:


and Class_ class:



and tables looks like this:


table class have: classId, name and clasroomId

and table classroom: classroomId and name

And i wonder how to make mapping for Set classes in Classroom.hbm.xml
and mapping for classroom in Class.hbm.xml

Thanks a lot.
 
Slavko Glisic
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I try like this in Classroom.hbm.xml:


and in Class_.hbm.xml:



But it seems like dont work because if I delete one class from the Classroom it doesnt update it...
 
Slavko Glisic
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And I have this error:



Anybody had same problem?

b.t.w I use MySql
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic