Hi,

I must reopen this thread because I think this bug is in latest version of
the cartridge (1.5.0-SNAPSHOT) again.


Darius Jockel wrote:
> 
> Bug is fixed.
> Refer:  http://fornax-platform.org/tracker/browse/CHB-18
> http://fornax-platform.org/tracker/browse/CHB-18 
> 
> Regards
> Darius
> 

You can see it in the reference project:

ClassAImpl.hbm.xml:
<hibernate-mapping auto-import="true">
    <class name="packageA.packageB.ClassAImpl" table="TB_CLASSA">
        ...
        <set access="property" inverse="true" name="classCs">
            <key>
                <column name="classa_id" not-null="false" />
            </key>
            <one-to-many class="packageA.packageB.ClassCImpl" />
        </set>
        ...
    </class>
</hibernate-mapping>

ClassCImpl.hbm.xml:
<hibernate-mapping auto-import="true">
    <class name="packageA.packageB.ClassCImpl" table="TB_CLASSC">
        ...
        <discriminator />
        <many-to-one class="packageA.packageB.ClassAImpl"
            name="classA">
            <column name="TB_CLASSA_TO_TB_CLASSC" not-null="true" />
        </many-to-one>
    </class>
</hibernate-mapping>


The column names are different (classa_id vs. TB_CLASSA_TO_TB_CLASSC).
The result: Two columns in the Data.dll.


Data.dll:
create table TB_CLASSA (
        ID bigint not null,
        class varchar(255) not null,
        primary key (ID)
);

create table TB_CLASSC (
        ID bigint not null,
        class varchar(255) not null,
        TB_CLASSA_TO_TB_CLASSC bigint not null,
        classa_id bigint,
        primary key (ID)
);


Regards
Nils



-- 
View this message in context: 
http://www.nabble.com/Hibernate%3A-one-to-many-association-tp12273304s17564p15976500.html
Sent from the Fornax-Platform mailing list archive at Nabble.com.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Fornax-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fornax-developer

Reply via email to