Hello again,
I have been trying to simplify some parts of my code and so I figured the 
following will work:

I have a many-to-many relation, say A <<->> Base
Base has two subclasses, say Base1 andBase2 modeled using single table 
inheritance,
so basically:
<obj-entity name="Base1" superEntityName="Base" className="Base1">

<qualifier><![CDATA[Type = "BASE1"]]></qualifier>
</obj-entity>
<db-relationship name="bases" source="A" target="Base" toMany="true">
<db-attribute-pair source="A_ID" target="BASE_ID"/>
</db-relationship>

I thought that by adding this:

<obj-relationship name="bases1" source="A" target="Base1" 
db-relationship-path="bases"/>,

in other words: A -> B1, 

Then I would be able to do A.getBases1() to retrieve all of my subclasses 
instead of always having to go through A.getBases() and then filter using the 
discriminator column.
But it is not working. Any idea how to achieve what I am trying to do?
Thanks.

Reply via email to