Steve Knight
2002-02-11 16:04:05 UTC
Hello,
First let me just say that Middlegen 1.0 looks great so far...nice work Aslak!
Now, i tried a simple example using two tables as folows:
parent --> parentid, name
child --> childid, name, parentid
where parentid in the child table is the Foreign Key to the parent table.
The problem occurs when I try to call the cmr accessor method getChilds( ), I get the following error:
The Parent is:
1 John Smith
The Children are:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: FindByForeignKey failed
Embedded Exception
Column not found: Unknown column 'parent_parentid' in 'where clause'; nested exception is:
javax.ejb.EJBException: FindByForeignKey failed
Embedded Exception
Column not found: Unknown column 'parent_parentid' in 'where clause'
Why is it calling the foreign key field "parent_parentid" when it should be just "parentid"? Why is it creating this column name? Please pardon my ignorance as I am new to both XDoclet and Middlegen (and EJBs for that matter). All of the relationship code was generated by Middlegen and I am calling getChilds( ) from within a remote Parent interface method called getChildrenData( ), which returns a collection of dataobjects (to the remote client) representing the parent's associated children.
Any ideas?
Thanks,
Steve
First let me just say that Middlegen 1.0 looks great so far...nice work Aslak!
Now, i tried a simple example using two tables as folows:
parent --> parentid, name
child --> childid, name, parentid
where parentid in the child table is the Foreign Key to the parent table.
The problem occurs when I try to call the cmr accessor method getChilds( ), I get the following error:
The Parent is:
1 John Smith
The Children are:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: FindByForeignKey failed
Embedded Exception
Column not found: Unknown column 'parent_parentid' in 'where clause'; nested exception is:
javax.ejb.EJBException: FindByForeignKey failed
Embedded Exception
Column not found: Unknown column 'parent_parentid' in 'where clause'
Why is it calling the foreign key field "parent_parentid" when it should be just "parentid"? Why is it creating this column name? Please pardon my ignorance as I am new to both XDoclet and Middlegen (and EJBs for that matter). All of the relationship code was generated by Middlegen and I am calling getChilds( ) from within a remote Parent interface method called getChildrenData( ), which returns a collection of dataobjects (to the remote client) representing the parent's associated children.
Any ideas?
Thanks,
Steve