Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to map this hierarchy

 
Ulas Ergin
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
let's assume i have 3 classes,first one,lets say F1 is a a mapped super class
second one,namely F2, is an entity derives from first one
and third entity class named F3 is derived from second one F2



now the problem:
I want to have 2 tables
T2 mapped by F2 having i1 and i2 [note i1 is coming from F1]
T3 mapped by F3 having i1 and i3 [note i3 is coming from F1]

unfortunately since F3 is derived from F2,I can have i1 only in F2
but I want to have that mapped superclass' fields in both

thanks in advance,

 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, you want i1 duplicated in two tables? To me, that's a problem. I'm not saying there's not a way, but what's the point of having the value duplicated in two tables?

-Cameron McKenzie
 
Ulas Ergin
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hmm..i know it does not quite sound well... but let's say i am using the mapped super class,F1 as a way to imply some restriction to the system.
I mean ,all persistent objects must have field i1 and all db tables should have a field i1.

what is the way you are thinking to achieve this?
 
Ulas Ergin
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well..i guess this silence means no luck
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic