I'm attempting to utilize the <many2many> element in my middlegen build file. Unfortunatly I keep getting this error message:
Code:
[middlegen] (middlegen.MiddlegenPopulator 1044) The many2many relation groups-users_groups-users was declared, but not identified.
I'm using a simple HSQL setup here's the SQL for the tables:
Code:
CREATE TABLE USERS(
ID INTEGER NOT NULL IDENTITY PRIMARY KEY,
NAME LONGVARCHAR(255) NOT NULL
)
CREATE TABLE GROUPS(
ID INTEGER NOT NULL IDENTITY PRIMARY KEY,
NAME LONGVARCHAR(255) NOT NULL
)
CREATE TABLE USERS_GROUPS(
USER_ID INTEGER NOT NULL,
GROUP_ID INTEGER NOT NULL,
CONSTRAINT SYS_PK_USERS_GROUPS PRIMARY KEY(USER_ID,GROUP_ID),
CONSTRAINT SYS_FK_1 FOREIGN KEY(USER_ID) REFERENCES USERS(ID),
CONSTRAINT SYS_FK_2 FOREIGN KEY(GROUP_ID) REFERENCES GROUPS(ID))
and the <many2many> element looks like this
Code:
<many2many>
<tablea generate="true" name="users"/>
<jointable name="users_groups" generate="false"/>
<tableb generate="true" name="groups"/>
</many2many>
I've read through the sample that comes with the Middlegen package (airline) and I just can't seem to pinpoint where I'm going wrong. As always, any help is greatly appreciated
Thanks,
Tyler Pitchford