• Post Reply Bookmark Topic Watch Topic
  • New Topic

hibernate: table per concrete class implicit polimorphism  RSS feed

peter cooke
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks to anyone helping me to learn.

I have an unusual mapping that I am trying to figure out how to do.
for lack of being allowed to give a more accurate example to my programming task.

I have 4 tables of lets say car, stereo, transmission, assembly_details

a car has a stero (zero or 1), a transmission, and zero or more assembly_details

a stereo has an asembly_details (1-to-1)

a transmission has an assembly_details. (1-to-1)

An assembly_details record may have one or more sub_assembly_details,
and a reference to it's parent either a car/stereo/transmission/assembly_details.

In Hibernate how do I say that assembly_details parent is either a car, a stereo, transmission, or assembly_details???

Is the proper solution to use "Table per concrete class using implicit polymorphism"

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!