-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Why Hibernate can't find inherited attribute???
PostPosted: Thu Mar 04, 2004 5:20 pm 
Newbie

Joined: Thu Dec 11, 2003 12:10 pm
Posts: 16
Code:
<class name="nl.strohalm.cyclos.entities.accounts.Account" table="accounts" discriminator-value="account">
      <id name="id" type="long" column="account_id">
            <generator class="native"/>
      </id>
      <discriminator column="subclass" type="string"/>

      <property name="creationDate" column="creationDate" type="calendar"/>
      <property name="lastAmount" column="lastAmount" type="float"/>

      <many-to-one name="owner" column="owner_id" class="nl.strohalm.cyclos.entities.accounts.IAccountOwner"/>
      
      <subclass name="nl.strohalm.cyclos.entities.accounts.LimitedAccount" discriminator-value="limited_account"/>
</class>


Code:
<class name="nl.strohalm.cyclos.entities.accounts.IAccountOwner" table="members">
        <id name="id" type="long" column="member_id">
            <generator class="native"/>
        </id>
        <discriminator column="subclass" type="string"/>
    <subclass name="nl.strohalm.cyclos.entities.application.Application" discriminator-value="application">
        <one-to-one name="bankAccount" class="nl.strohalm.cyclos.entities.accounts.Account" property-ref="owner"/>
        <one-to-one name="communityAccount" class="nl.strohalm.cyclos.entities.accounts.LimitedAccount" property-ref="owner"/>
    </subclass>
</class>


When I run schemaexport ant task this is the answare:
Code:
[schemaexport] BUILD FAILED: file:/home/igor/workspace/cyclos/build.xml:92: Schema text failed: property-ref not found: owner in class: nl.strohalm.cyclos.entities.accounts.LimitedAccount


But these are my classes:
Code:
public class Account {

   private Long id;
   private Calendar creationDate;
   public IAccountOwner owner;
..............


Code:
public class LimitedAccount extends Account {

   public LimitedAccount() throws ApplicationException {
      super();
   }

   public LimitedAccount(IAccountOwner owner) throws ApplicationException {
      super(owner);
   }
}


What is the problem??


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.