oops.. I wrote that i've been trying
AppicationPeer.addApplicant(app);
but i've been trying the correct
application.addApplicant(app);
just in case any jumps on that quick..
On Tuesday, August 12, 2003, at 03:17 PM, Mark Lowe wrote:
Hello
I just want to double check my thinking on how this works, because something isn't happening for me..
Okay I've a schema in which i've defined my foreign keys, for example.
<table javaName="Applicant" name="APPLICANT"> //bla bla
<column name="APPLICATION_ID" type="INTEGER" javaName="ApplicationId" />
<foreign-key foreignTable="APPLICATION"> <reference local="APPLICATION_ID" foreign="APPLICATION_ID"/> </foreign-key> </table>
<table javaName="Application" name="APPLICATION">
<column name="APPLICATION_ID" primaryKey="true" required="true" type="INTEGER" autoIncrement="true" javaName="Id" />
The idea being to allow multiple applicants per application..
Now when I want to save my application
Applicant appicant = new Applicant();
//i'm not using beanUtils but for the sake of brevity
BeanUtils.copyProperties(applicant,applicantBean);
ApplicationPeer.addApplicant(applicant);
//save or doInsert() from the peer I've been trying both applicant.save(); application.save();
These are saved to the DB just applicationId in my applicant table isn't doing its thing..
Any ideas? Or am i just doing it wrong?
Cheers Mark
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
