db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Lowe <mark.l...@talk21.com>
Subject foreign keys and addMyObj method
Date Tue, 12 Aug 2003 14:17:36 GMT

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"/>

<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



//save or doInsert() from the peer I've been trying both

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: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

View raw message