I just ran into this with an earlier version, so I check the latest
download.  I was trying to create the OM object from a current
database.  The database is part of a product we bought, and is
horrible!  Well anyway, none of the tables have primary keys.  They have
unique keys, but no primary keys.

What happened is that torque created the class with the object.vm, and
as you can see below it get into a recursive function call.  Eventually
throwing a stack exception.

My change was to do a "return null".  I can send a diff if you want?


    public ObjectKey getPrimaryKey()
    {
#if ($table.PrimaryKeys.size() == 1)
        return get${table.PrimaryKeys.get(0).JavaName}();
#elseif ($table.PrimaryKeys.size() > 1)
    #set ($i = 0)
    #foreach ($pk in $table.PrimaryKeys)
        pks[$i] = get${pk.JavaName}();
        #set ($i = $i +1)
    #end
        return comboPK;
#else
        return getPrimaryKey();
#end
    }


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to