Re: How to delete all rows using doDelete?

2004-01-28 Thread Josh Holtzman
Try using org.apache.torque.util.BasePeer.deleteAll() Cheers, Josh Steffen Mueller wrote: Hi Jiaqi, I am working with the latest version of Torque, version 3.1 as of Sept 1, 2003. Will this problem be fixed in the next release? Are there other solutions to this problem? Regards, Steffen At

Re: Another question on foreign key getters and performance

2003-12-01 Thread Josh Holtzman
cts to be fully instantiated (including all referenced objects and collections) when returned by a select -- that would be really nice. Thanks, Josh Scott Eade wrote: Josh Holtzman wrote: I recently asked a question about the performance of calling torque objects' foreign key getters, a

Another question on foreign key getters and performance

2003-12-01 Thread Josh Holtzman
I recently asked a question about the performance of calling torque objects' foreign key getters, and I just read another question from a lead developer trying to shield his team from using these getters (a smart move, since these just kill performance). My question is this: If you don't use t

Re: Performance problems

2003-11-27 Thread Josh Holtzman
Thanks Dave. Looks like I need to freshen up on my options for doing joins... nulling the eliminated data sounds to me like just the ticket. Cheers, Josh Dave Newton wrote: On Thu, 2003-11-27 at 03:21, Josh Holtzman wrote: Thanks Andras. I thought about doing joins, but I run into this

Re: Performance problems

2003-11-27 Thread Josh Holtzman
o you need to display and generate for that aslo torque classes. This will work olny if you read the info only (i.e. a report on screen or something like that) but not making modfications (insert/update/delete) beacause i don't know how these works on views. Best wishes, Andras. Josh Holtz

Performance problems

2003-11-26 Thread Josh Holtzman
I'm using torque in a webapp, and I'm seeing really slow performance when I try to get data from "nested" objects. Here's what I mean: I have a torque object named Account. An account can have several Assignments, which is another torque object. An assignment can have Jobs (yup -- another to

Re: returning a List of all the rows from a table

2003-11-19 Thread Josh Holtzman
On a related note... I have found that using a new Criteria() for selects will return all of the records on a doSelect(), as Tulsi Das writes below, but it will not remove all of the records on a doDelete(). Has anyone else had this problem? Am I using the wrong technique to clear my tables?

Re: Select count(*)

2003-11-12 Thread Josh Holtzman
One way is to select the objects you want using Criteria and CustomerPeer.doSelect, which returns a list of Customers matching your criteria (customerId=1). Once you have the list, list.size() returns the number of Customers returned, which is what you want. But if you didn't want the list of

Re: Simple select in Torque gets difficult???

2003-11-12 Thread Josh Holtzman
In my opinion Criteria and Criterion are like an "SQL Builder" for people who doesn't know/like the SQL language. But I don't see yet the real advantages. I can see your point, but there is one very important feature that you overlook: SQL isn't consistent across database systems. An MS SQL qu

RE: utility of a setfields tool?

2003-09-17 Thread Josh Holtzman
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 HOLTZMA

RE: ClassNotFoundException

2003-09-12 Thread Josh Holtzman
I've also noticed that, even with Tomcat set to reload modified classes, it won't necessarily _deploy_ new classes without a server (not just webapp) restart. = JOSH HOLTZMAN Web Development http://joshholtzman.com = -Origin

Generic Admin Tool for Torque Objects

2003-09-11 Thread Josh Holtzman
eld names (and hence, values) for an unknown torque object type? Do I need to create an empty torque object in my schema and have al of my other objects extend this one, just so I can get a common superclass with the getFields() method? I hope this makes sense. Thanks for any ide