facebook

My Eclipse code generator and hibernate and polymorphism

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #283303 Reply

    azahur
    Member

    This message has not been recovered.

    #283349 Reply

    Loyal Water
    Member

    I wanted to findout if their is some example out their which would show me how to generate Hbm.Xml files and the related code via myelipse and how to use it

    This is the doc we have that you can refer to.
    http://www.myeclipseide.com/documentation/quickstarts/hibernate/

    #283369 Reply

    azahur
    Member

    Here is how I have done mapping in my AuthenticationPolicy.hbm.xml

    <joined-subclass name =”com.xxx.ChildAuthenticationPolicy1″ table =”CHILD_AUTHENTICATION_POLICY1″
    extends=”com.xxx.AuthenticationPolicy”>
    <key column=”ID”/>
    <property name=”xxx” column=”COLUMN_XXX”/>
    </joined-subclass>
    <joined-subclass name =”com.xxx.CHILDAuthenticationPolicy2″ table =”CHILD_AUTHENTICATION_POLICY2″
    extends=”com.xxx.AuthenticationPolicy”>
    <key column=”ID”/>
    <property name=”serverPinRequired” column=”SERVER_PIN_REQUIRED”/>
    </joined-subclass>

    Now when I try to get the AuthenticationPolicyDAO via spring… I get the error in class: com.xxx.AbstractAuthenticationPolicy, getter method of property: id
    and later the error says object is not an instance of declaring class
    The Getter method is in the AbstractAuthenticationPolicy and in the childrenAuthenticationPolicy.java too

    #283376 Reply

    azahur
    Member

    Ok found the answer.
    Its simple

    The variables in the parent/abstract object need to be proteted or public and not private duh

    #283391 Reply

    Loyal Water
    Member

    Glad you found the answer. Thank for letting me know.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: My Eclipse code generator and hibernate and polymorphism

You must be logged in to post in the forum log in