classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view


This post has NOT been accepted by the mailing list yet.
I have the following tables created using Hibernate :
create table PARTY (
    id bigint generated by default as identity,
    community_id bigint,
    primary key (id))

create table community (
    id bigint generated by default as identity,
    owner_id bigint not null, primary key (id))
Both tables have foreign key constraints on each other
alter table COMMUNITY add constraint FK4DDD3FC917D1D5AC foreign key (owner_id) references PARTY;
alter table PARTY add constraint FK48622C6D15AAED3 foreign key (community_id) references COMMUNITY;

A Community is owned by a Party and a party is by default a member of a Community

This is not an issue in the EJB world. Unfortunately this is a problem with DBUnit complaining with a CyclicTablesDependencyException Table: COMMUNITY ([PARTY])

Thanks for your help