You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Graham Leggett <mi...@sharp.fm> on 2003/09/18 00:24:14 UTC

Sudden torque breakage

Hi all,

I recently made a trivial change (a required column on a table was set 
to not required) to my torque database schema file, and now my om 
objects refuse to compile.

maven torque completes successfully, but maven jar:install throws 100 
errors, some of which are:

/home/sam/minfrin/src/fma/patricia-db/src/java/za/co/fma/patricia/database/om/Persist.java:12: 
za.co.fma.patricia.database.om.Persist should be declared abstract; it 
does not define save(java.sql.Connection) in org.apache.torque.om.BaseObject
public  class Persist
         ^
/home/sam/minfrin/src/fma/patricia-db/src/java/za/co/fma/patricia/database/om/Company.java:12: 
za.co.fma.patricia.database.om.Company should be declared abstract; it 
does not define save(java.sql.Connection) in org.apache.torque.om.BaseObject
public  class Company
         ^
/home/sam/minfrin/src/fma/patricia-db/src/java/za/co/fma/patricia/database/om/Role.java:12: 
za.co.fma.patricia.database.om.Role should be declared abstract; it
does not define save(java.sql.Connection) in org.apache.torque.om.BaseObject
public  class Role
         ^

I am using the torque that is used by maven v1.0b10 (whatever that is).

Anyone know how to get this back into a sane state?

Regards,
Graham
--


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


RE: utility of a setfields tool?

Posted by Josh Holtzman <jo...@joshholtzman.com>.
I just use the commons beanutils to copy all of the fields in my struts
action forms (basically just user input collected into a bean) into my
torque object.  Magic!

Of course, this only helps if you're using struts... which you should ;)

Josh

=============================
JOSH HOLTZMAN Web Development
http://joshholtzman.com
============================= 

-----Original Message-----
From: Juan Pablo Liska [mailto:jp@guatec.com] 
Sent: Wednesday, September 17, 2003 6:40 PM
To: Apache Torque Users List
Subject: utility of a setfields tool?


I am working on a utility that would use the JavaNameGenerator and
reflection to set all the fields in a data object given the object and
the httpserveletresponse. two changes would be required for this to work
with other people's torque:

- have to modify the abstract class BaseObject so that it has a getPeer
method.
- have to change class generator so setters take an Integer argument
rather than int

does this seem worth while? have others found a way to accomplish the
same thing (automatically set data coming from web pages)?

oreodata from niggle (www.niggle.org) has some nice functionality in
this department. when you call setfields, it validates the incoming data
and populated the peristent object's fields.

it saves a lot of code.


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


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


utility of a setfields tool?

Posted by Juan Pablo Liska <jp...@guatec.com>.
I am working on a utility that would use the JavaNameGenerator and
reflection to set all the fields in a data object given the object and the
httpserveletresponse. two changes would be required for this to work with
other people's torque:

- have to modify the abstract class BaseObject so that it has a getPeer
method.
- have to change class generator so setters take an Integer argument rather
than int

does this seem worth while? have others found a way to accomplish the same
thing (automatically set data coming from web pages)?

oreodata from niggle (www.niggle.org) has some nice functionality in this
department. when you call setfields, it validates the incoming data and
populated the peristent object's fields.

it saves a lot of code.


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