db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-torque Wiki] Update of "GettingTorqueToWork" by PeterHamlen
Date Mon, 30 Oct 2006 14:46:15 GMT
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


Mime
View raw message