I gave uni association having many to many relationship between two entities, from C to CG
It is referred in C entity’s hbm.xml as
<set name="cG" table="C_G2C" order-by="C_G_FK" lazy="true" fetch="select" inverse="false">
<key foreign-key="C_G_C_FKC">
<column name="C_FK" sql-type="BIGINT"/>
</key>
<many-to-many class="CGImpl" foreign key="C_C_G_FKC">
<column name="C_G_FK" sql-type="BIGINT"/>
</many-to-many>
</set>
My Table Structure in DB is
@entity
C
c_id,
c_name,
c_g_fk
@entity
CG
cg_id,
cg_name
when I try to call c.getCG(),
The following error is thrown
ERROR: relation “c_g2c” does not exist
I could’nt trace the problem
could someone help..plz
Adding an intermediate entity solved the problem