db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Eade <se...@backstagetech.com.au>
Subject Re: Generating join methods - is there a bug?
Date Tue, 21 Jan 2003 05:09:17 GMT
I tracked this down to the following change:


By adding some debugging code I have found that for me the "!" on the line
that was added:

    #set ( $doJoinGet = !$tblFK2.isForReferenceOnly())

Doesn't work (i.e. "!false" is the same as "false").

If I replace the above line with:

    #if ($tblFK2.isForReferenceOnly())
        #set ($doJoinGet = false)
        #set ($doJoinGet = false)

Then everything works fine - i.e. the Join methods I am expecting are

So does the "!false" syntax work for anyone?

I'll submit a patch anyway.


Scott Eade
Backstage Technologies Pty. Ltd.
.Mac Chat/AIM: seade at mac dot com

On 21/01/2003 3:11 PM, "Scott Eade" <seade@backstagetech.com.au> wrote:

> Is it just me or does Torque 2.2 no longer generate join methods?  The code
> exists in om,Object.vm, but I don't think it is ever being invoked.
> Has anyone had a method get${relCol}Join${relCol2} generated by Torque 2.2
> (where relCol is an entity whose foreign key is declared in the schema for
> that current object and relCol2 is a third entity whose foreign key is
> declared in the schema for relCol)?
> I think there may be a bug in om,Object.vm that mucks up the check to see if
> relCol2 is the same as the entity currently being generated (it only seems
> to be evaluated for the first fk defined for relCol which is always (at
> least in my case) the object being generated - and hence the methods are
> never generated).
> I'll keep looking, but I am interested to know if anyone else has also hit
> this problem.
> Cheers,
> Scott

View raw message