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 Re: Foreign keys another great mystery...
Date Tue, 12 Aug 2003 17:50:39 GMT
Thanks Dave...

I've been through the docs, and those generated from the classes.. The 
api's look great, they just don't seem to work in practice, I can live 
with the fact that inheritance isn't supported (despite what the docs 
say) but foreign keys no..

Thanks.. for pointing me to the docs, they're great aren't they i've 
been reading them for days, its just a shame that as soon as you try 
anything useful they don't seem to be right.. Correct me if i'm wrong. 
But if you've managed to do this without any sql hacks I'll be 
surprised, in fact I'd eat my hat.. Tell you what i'll even give you 
back the pics I've got of you and your ma.

So come on then Dave show me how stupid I am , and show me how to do 
this, cos my guess is you don't know.. So far all this works as far as 
giving me the methods i require, again the javadoc looks the dog's.. 
For example .I have an application table and I have many applicants per 
application (are you with me)..

So I thought, after studiously going though the docs, I'll write my 
schema do some column mapping and life would be great and small green 
furry creatures from alfa sentori would be real small green furry 
creatures form alfa sentori (forgive my spelling)..

<table name="APPLICATION" javaName="Application"...
<column name="APPLICATION_ID" primaryKey="true" ...
...
<table name="APPLICANT" javaName="Applicant">

<column name="APPLICANT_ID" ...

<foreign-key foreignTable="APPLICATION">
	<reference local="APPLICATION_ID" foreign="APPLICATION_ID"/>
</foreign-key>

The api gives me a setApplicant(Applicant v) method which is great.. 
Despite the fact it doesn't work.. Now I don't mind the fact this 
doesn't work, just that all these little not worky things seem to be a 
tad esoteric and not mentioned in the docs.. Variations of this have be 
trying the addApplication(Application v) in the applicant api, but alas 
no.

After all this a cry for help and I get some smart arse telling me to 
relax and go read the docs. Well done.

Cheers Mark


On Tuesday, August 12, 2003, at 06:18 PM, Dave Newton wrote:

> On Tue, 2003-08-12 at 13:08, Mark Lowe wrote:
>> Thanks Dave very helpful... Well done..
>
> Thanks :) Almost as well done as waiting two hours for someone to 
> answer
> your question, I suppose.
>
>>>> Do foreign keys and the subsequent methods generated from such 
>>>> entries
>>>> in a schema actually work?
>
> Yes.
>
>>>> Please
>>>> tell me somebody, tell me point me to some reading or something, i'm
>>>> not being lazy.
>
> Oh, sorry, I forgot to point you at one of the top-level HOWTOs on the
> Torque site.
>
> http://db.apache.org/torque/peers-howto.html
>
> Other than that I'd have to point you at my sample Jython code and I'm
> not convinced that would be terribly helpful.
>
> Dave
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message