You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by Apache Wiki <wi...@apache.org> on 2006/10/30 15:46:15 UTC

[Db-torque Wiki] Update of "GettingTorqueToWork" by PeterHamlen

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-torque Wiki" for change notification.

The following page has been changed by PeterHamlen:
http://wiki.apache.org/db-torque/GettingTorqueToWork

------------------------------------------------------------------------------
  
  Don't worry if you get this error, the way around it is to manually create the database and then use the command 'maven torque:insert-sql' to create your tables
  
+ 
+ ----
+ = Received exception inserting new object - "inserting null value in not-null primary key column"
+ 
+ When I tried to create my first Torque project (other than the tutorial), I got a really wierd error trying to save a new Biller object.  Torque complained that it was trying to insert a null "biller id" (the primary key for the object) when it ran the insert.
+ 
+ The problem was that I had copied some of the XML from the tutorial (bookstore) and in particular had the xml that read "<database name='bookstore'..." at the top.  Since my database name was actually "billers" (and was referenced like that in my Torque.properties), it caused the problem.  Once I changed the name of the database to be the correct one, it went away.
+ 
+ -PeterHamlen
+ 

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