| Author |
Unable to define/override @Id(s) on a subclass; which classes i have to solve?
|
Thanaphorn Thongthien
Greenhorn
Joined: Aug 03, 2010
Posts: 15
|
|
i got this error
Caused by: org.hibernate.AnnotationException: Unable to define/override @Id(s) on a subclass: MPrint.MVC.Model.Paper
and these are my codes
PaperSize
i just need the table Paper keep the data only PaperSizeNo
but the details of PaperSizeNo will keep in their table that have width, length and unit ( inch, cm)
for easy to manage the database,, another class of my project were create relation diagram like these problem classes
how can i solve it,, really need help ! (T - T)
in the early, i have already added the single class to DB and it's work!
what about the parent and child class?? i don't know where to adapt them..
ps. i'm quite new with these,, [first programming] - -'
|
 |
Wendy Gibbons
Bartender
Joined: Oct 21, 2008
Posts: 1098
|
|
Thanaporn Thongthien wrote:
i just need the table Paper keep the data only PaperSizeNo
but the details of PaperSizeNo will keep in their table that have width, length and unit ( inch, cm)
for easy to manage the database,, another class of my project were create relation diagram like these problem classes
I am really sorry i tried helping you but i found some of the english really difficult to understand (quoted above) could you supply us with the database design indicating the foreign keys and another go at the quoted sentances.
|
 |
Thanaphorn Thongthien
Greenhorn
Joined: Aug 03, 2010
Posts: 15
|
|
thanks for reply anyway and this is the database column that i will keep in PAPER and PAPERSIZE
Paper's Database will keep
PaperNo
PaperName
PaperType
PaperSizeNo
PaperGram
PaperPrice
PaperSize's Database
PaperSizeNo
PaperWidth
PaperLenght
PaperUnit
that is what i mean - - '
|
 |
Wendy Gibbons
Bartender
Joined: Oct 21, 2008
Posts: 1098
|
|
ok, i am not sure if you are using annotations or xml files but look into the many-to-one annotation for the paperSizeNo column
and pay special attention to cascade.
|
 |
 |
|
|
subject: Unable to define/override @Id(s) on a subclass; which classes i have to solve?
|
|
|