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??