- This topic has 3 replies, 3 voices, and was last updated 16 years, 4 months ago by Brian Fernandes.
-
AuthorPosts
-
naselayMemberThis is the scenario of my problem.
A moment ago, i was writing a mapping for my object Person. After i listed the mapping for the ID of the person, i proceeded to create a mapping for the remaining fields of the Person object. Upon writing this line,
<property name=”lastName” type = “string” column = “FIRST_NAME”/>
an error sign (red X mark) occurred at the left corner of myEclipse window telling me that
Multiple annotations found at this line:
– “Attribute ‘column’ must be declared for element type ‘property’ ”
– “Attribute ‘type’ must be declared for element type ‘property’ “But that’s what i did, I placed those attributes INSIDE the property tag.
This makes me wonder now what made the code erroneous. And, how come the mapping syntax didn’t work if it worked in NetBeans. I was thinking if it is a mapping syntax error or just a few setting flaw of MyEclipse.
Thanks in advance for everyone who will help!
Loyal WaterMemberCan you paste a sample file here that would help me reproduce this issue.
naselayMemberthanks for your help ^_^ but the previous problem was already solved… unfortunately, i have a new problem.
I now have 5 classes… Item, Section, Group and Form are subclasses of Data..
Class Data contains the common attribute of its subclasses which is ID only.
The problem is, i don’t know how to map id from the subclasses to their corresponding tables….
Is possible to map the field of superclass using the subclass.. if yes, then HOW?????
Brian FernandesModeratornaselay
This really is not a MyEclipse question, but I would suggest reading the following chapter on Hibernate Inheritance for a few pointers, there are several ways in which you could design your solution.
http://www.hibernate.org/hib_docs/reference/en/html/inheritance.html
Hope this helps.
Brian. -
AuthorPosts