I'm having trouble finding information on this. Here is an example of
what i need to do.
interface IBase {}
interface ISubOne : IBase{}
interface ISubTwo : IBase{}
class Base : IBase{}
class SubOne : Base, ISubOne{}
class SubTwo : Base: ISubTwo{}
in the beginning we were only using the concrete classes.
the maps look like:
<hibernate-mapping>
<class name="Base" table="BASE">
<id name="Id" column="BASE_ID">
<generator class="identity"/>
</id>
... some properties ...
</class>
</hibernate-mapping>
<hibernate-mapping>
<joined-subclass name="SubOne" table="SUB_ONE" extends="Base">
<key column="BASE_ID"/>
... some properties ...
</joined-subclass>
</hibernate-mapping>
<hibernate-mapping>
<joined-subclass name="SubTwo" table="SUB_TWO" extends="Base">
<key column="BASE_ID"/>
... some properties ...
</joined-subclass>
</hibernate-mapping>
This is working with no issue.
We refactored our code to use interfaces to better support testing. So
we have changed the maps to use the interfaces.
<hibernate-mapping>
<class name="IBase" table="BASE">
<id name="Id" column="BASE_ID">
<generator class="identity"/>
</id>
... some properties ...
</class>
</hibernate-mapping>
<hibernate-mapping>
<joined-subclass name="ISubOne" table="SUB_ONE" extends="IBase">
<key column="BASE_ID"/>
... some properties ...
</joined-subclass>
</hibernate-mapping>
<hibernate-mapping>
<joined-subclass name="ISubTwo" table="SUB_TWO" extends="IBase">
<key column="BASE_ID"/>
... some properties ...
</joined-subclass>
</hibernate-mapping>
what we can't figure out how to do is connect these mappings to the
Implemented classes.
Any help would be greatly appreciated and thank you in advance.
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.