Jim Mackraz wrote:
> 
> I am using the recipe for standalone torque from Steve Davis (torque outside
> turbine - detailed example (long))
> http://www.mail-archive.com/[email protected]/msg03639.html
> [THANKS, Steve!]
> 
> The recipe includes building torque from cvs jakarta-turbine-torque, etc.
> I checked out jakarta-turbine-torque tonight (2Nov2001) and did just that.
> 
> I'm using Steve's bookstore schema w/ two changes:
> - remove app-data top-level tag.
> - add idMethod="native" to all tables (I've tried the deprecated "sequence"
> too, for grins)
> 
> Running his test program, I get the error: cannot insert NULL into
> ("AQUI1"."AUTHOR"."AUTHOR_ID")
> (AUTHOR_ID is the autoincrement key)
> 
> ----
> I've done what I can to scour the mailing list (I have village-1.5.3-dev.jar
> as per one posting).
> I tried playing around w/ the source and jdb... couldn't figure out much.  I
> don't have Village source; for one reason, because www.working-dogs.com is
> not responding tonight.
> 
> I don't know where the sequence/insert is supposed to be composed anyway.
> I did follow
> http://www.mail-archive.com/turbine-user%40jakarta.apache.org/msg04064.html
> and see that Object keyInfo = tableMap.getPrimaryKeyMethodInfo();
> at line 767 of BasePeer.java is returning null...  but I can't figure out
> what to do with his advice:
>

         #elseif ($table.IdMethod == "sequence" ||  ($table.IdMethod ==
"native" && $dbprops.get("idMethod") == "sequence"))
        tMap.setPrimaryKeyMethodInfo("$table.SequenceName");

the line above ~98 from MapBuilder.vm should be inserting the sequence
name as the needed information.  Do you not see any code from this in
your generated map builder classes?  Note setSequenceInfo just calls
setPrimaryKeyMethodInfo.




> tMap.setSequenceInfo( insert HARD-CODED key information here );
> I put his fragment in MapBuilder.vm and the generated code in
> AuthorMapBuilder.java now looks like this:
>      tMap.setSequenceInfo( getAuthor_Id() );
>      tMap.addPrimaryKey ( getAuthor_Id(), new Integer(0) );
>

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

Reply via email to