Author | Message |
---|---|
trivedidr
Posts: 54
|
Posted 18:21 Oct 23, 2009 |
Hello, I have onlineassignment class object in onlinesubmission class. But onlineassignment class is sub class of assignment class. so, how can I map this object in hibernate?
|
Sanaz_6101
Posts: 40
|
Posted 19:42 Oct 23, 2009 |
I guess its better to have your object (the parent one like assignment) in parent class(submission) instead of subclass and if so then if you have assignment inside submission in order to create hibernate of submission you just need to define your object. but in general if you need to map your subclass inside your hibernate you can use 2 formats : <joined-subclass name="xxx" table="xxx">
or <subclass name="xxx" discriminator-value="">
look at the hibenate on answer.hbm.xml under hbm.survey to get some idea |