Re: A few general questions of Torque 3.2

2006-02-07 Thread Dave Newton
Liu, Richard wrote: > Am I right? Short answer: no. > 1) Given an XML Schema in an XSD file (or DTD > file), generate a database schema that represents the XML Schema defined in > the XSD > The schema is defined in an XML file. XSD and DTD are ways of defining what a valid XML file looks

Re: how to write a query with Date type

2005-11-09 Thread Dave Newton
jill han wrote: Below is a piece of code to get records from a table and exception // startDate and endDate are Date object // aDate has Date data type in oracle db String sql = "Select * from aTable "; sql = sql + " Where aDate "; sql = sql + " Between '" + startDate + "' And '" + endDate + "'

Re: ID Broker woes...

2005-08-11 Thread Dave Newton
Thomas Fischer wrote: If you copy the primary key, I would not be surprised if the primary key would be reused, so if the issue persists after you ruled out that please re-send a mail. Nope, that was definitely the problem... The hidden perils of reflection-based utilities and not paying att

Re: ID Broker woes...

2005-08-10 Thread Dave Newton
BAH! Dave Newton wrote: So I iterate over the DefaultAnnouncementTypes, use BeanUtils.copyProperties to get everything that's the same [...] This, however, includes such gems as "getPrimaryKey" and little things like that... which is bad. N

ID Broker woes...

2005-08-10 Thread Dave Newton
And by "woe" I mean "whoa!" The bits of Model that are important: Events have AnnouncementTypes When a new Event is created its AnnouncementTypes are copied from from DefaultAnnouncementTypes So I iterate over the DefaultAnnouncementTypes, use BeanUtils.copyProperties to get everything that's

idbroker.cleverquantity issue?

2005-07-11 Thread Dave Newton
Hi, Using a fairly recent Torque (3.1, maybe 3.1.1) for some reason I started getting HUGE values for one of my NEXT_ID columns and the QUANTITY column. While saving new objects to that table I got OutOfMemory exceptions. When I made the NEXT_ID and QUANTITY values saner the OOM exception w

Re: James J Caserta/ChubbMail is out of the office.

2005-03-24 Thread Dave Newton
[EMAIL PROTECTED] wrote: If you have a Scheduled Irrigation or Musical Instruments issue [...] Did anybody else find that to be an... unusual combination of responsibilities? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: How to use doSelectJoin?

2005-03-17 Thread Dave Newton
Robert Bowen wrote: So how can I do the same thing for "user", which has a foreign key TO "users_profiles"? Isn't there a protected method in the base user that does the join? In the generated javadocs for your OM it should say something like "this isn't exposed to keep the API reasonable" or

Re: Can't delete row, either no delete or get "You must specify KeyDef..." exception.

2005-03-09 Thread Dave Newton
Thomas Fischer wrote: You use the foreign keys also as primary key. In my experience, using something which has another meaning as a primary key is not a good idea. Can you try to add another column, e.g. user_role_id, as a primary key, remove the primaryKey attribute from the other columns and

Can't delete row, either no delete or get "You must specify KeyDef..." exception.

2005-03-08 Thread Dave Newton
Hola, I'm at my wit's end. I'm trying to delete a record from a table that has three foreign keys (schema fragment attached) and it seems no matter how I try to do it I either get the "You must specify KeyDef attributes for this TableDataSet in order to delete a Record" exception. It's a MySQL d

SqlEnum visibility?

2004-05-18 Thread Dave Newton
Howdy, While doing some utilities for a project I'm working on I wanted to use org.apache.torque.util.SqlEnum as a return type but it's not visible outside its package. Is there a rationale for that? It's making me have to do some pretty kludgy stuff with something that could be much more elegant

Re: C++ tool like Torque?

2004-04-20 Thread Dave Newton
On Tue, 2004-04-20 at 10:08, Bogdan Vatkov wrote: > In fact I have extended the BaseObject vm to > contain extra information of the access mode for each for a > particular "Role". > (each column has 2 vectors of Roles - the first are roles allowed to read , > the second are roles allowed to modify

RE: SetFkId throws TorqueException

2004-04-13 Thread Dave Newton
On Tue, 2004-04-13 at 17:16, Michael Manske wrote: > After a short look into several generated sources i have to agree with Alex, > imho these throws declarations are not neccessary for the mentioned > setSomeForeignKey() methods. I would appreciate if the declarations would be > removed with the n

RE: Oracle 9i TIMESTAMP in primary key problems

2004-04-01 Thread Dave Newton
On Thu, 2004-04-01 at 11:02, Jarrell, Maury wrote: > > Totally unrelated, but I thought using "real-world data" as a primary > > key (or portion thereof) was generally a no-no in the DB world. Did I > > misunderstand? > You didn't misunderstand at all. I have had my share of frustrations > dealing

RE: Oracle 9i TIMESTAMP in primary key problems

2004-04-01 Thread Dave Newton
> From: Bob Davison [mailto:[EMAIL PROTECTED] > Due to the problems with the Oracle 9i JDBC drivers and DATE columns we > moved to TIMESTAMP columns instead. This seemed fine until we used one > of these columns in a primary key. Totally unrelated, but I thought using "real-world data" as a prim

Re: torque-gen multiple db ?

2004-03-19 Thread Dave Newton
On Fri, 2004-03-19 at 10:31, Bogdan Vatkov wrote: > > So, it seems like what would have to be done is to have Torque read in > > all the schema (since you may have relationships across XML files) but > > potentially generate only some of the output SQL/OM classes, correct? > If we have separate pro

Re: torque-gen multiple db ?

2004-03-19 Thread Dave Newton
On Fri, 2004-03-19 at 09:09, Bogdan Vatkov wrote: > in fact it is good to have separate XML files (not chunks but complete xml > file) as long as different people might be responsible for modelling particular > schema I definitely agree; I solved it by using chunks, but your idea is better--I just

Re: torque-gen multiple db ?

2004-03-19 Thread Dave Newton
On Fri, 2004-03-19 at 03:58, Bogdan Vatkov wrote: > Of course i have made some corrections in the torque runtime & > torque-generator to successfully support the . (dot) > inside tables names. but now i want to separate the definition of each > schema and place it in a separate file (xml file) Sin

Re: Data object Class Implementation

2004-03-16 Thread Dave Newton
On Tue, 2004-03-16 at 15:06, Pedro Salgado wrote: > > Why donĀ¹t you use a regular java bean and populate it with the values > retrieved from the model (database)? Fetch the data using the DAO and then > pass it to the bean... Something like: > > view.setPersonName(dao.getName()); Just to fur

Re: Torque BaseObjects' sons have wrong hashCodes ?!

2004-03-16 Thread Dave Newton
On Tue, 2004-03-16 at 05:37, Giulio Vezzelli wrote: > I'm trying to use hashCode() to identify business objects generated by > Torque... Why? > When the object is instantiated as a New User(), if I check hashCode() > immediately after instantiation the integer returned is different every time > I

RE: autoincrement of non primary key

2004-03-04 Thread Dave Newton
On Thu, 2004-03-04 at 01:15, Thomas Edwin Santosa wrote: > > > > > Will that make the group of them unique, or each one? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

RE: autoincrement of non primary key

2004-03-03 Thread Dave Newton
On Wed, 2004-03-03 at 23:55, Jeff Cox wrote: > Unless I am missing something, only makes the individual field > unique. What I need is the combination to be unique. In other words... > > If > SESSION_ID = 10 > SECTION_ID = 15 > ACTIVITY_ID = 25 > > then 10, 15, and 25 can't be again used toget

RE: autoincrement of non primary key

2004-03-03 Thread Dave Newton
On Wed, 2004-03-03 at 20:52, Jeff Cox wrote: > Dale, > First let me say I really appreciate you responding to my question. > Secondly, I would agree with you and in fact considered that possibility > early on in the design, but the truth is I need any given combination of > (SESSION_ID, SECTION

Re: doDelete question

2004-02-27 Thread Dave Newton
On Fri, 2004-02-27 at 03:57, Thomas Ebeling wrote: > Ah, and sorry for my bad English. I'm not posting on English mailing > lists very often. :) Better than most of our Deutsch. Lessee... Meine Deutsche ist sehr schlect. See? Dave -

Re: Criticism on Torque

2004-02-26 Thread Dave Newton
On Thu, 2004-02-26 at 06:59, Scott Eade wrote: > Peter Boheme wrote: > >I think there are three possibilities why. > >1. I am new two Torque > >2. I am to silly to use it > >3. The usage of Torgue is to complicated. > My opinion is that if after waging battle for two days you could find a > couple

Re: Criticism on Torque

2004-02-26 Thread Dave Newton
On Thu, 2004-02-26 at 08:52, Peter Boheme wrote: > Why torque.zip & torque-gen.zip are separated ? Because they're two different things? Not everybody needs the generation classes; they just need runtime support w/o the development stuff. Dave

RE: Debug - Bookstore

2004-02-25 Thread Dave Newton
On Wed, 2004-02-25 at 08:39, Peter Boheme wrote: > >> [DEBUG] TorqueInstance - -init(Torque.properties) > >> [DEBUG] TorqueInstance - -Config Object ... > >> > >> How can i turn off these messages ? > > > Edit default.properties file and search for > > something like: > > debug = on > > Change i

Re: NOT! Re: "Fixed", was: Re: setLimit NPEs?

2004-02-17 Thread Dave Newton
On Tue, 2004-02-17 at 02:38, Dale Thoms wrote: > Make sure you also have the name="yourdb" attribute > in the 'database' tag at the top of yourdb-schema.xml. > (something like: ) Aggghhh! You're right, the schema table generated by the jdbc task doesn't have the database name in it. (Of co

NOT! Re: "Fixed", was: Re: setLimit NPEs?

2004-02-16 Thread Dave Newton
On Mon, 2004-02-16 at 17:38, Dave Newton wrote: > If I change my example code to include a c.setDbName(...) after I do the > setLimit call it works. Well, I don't seem to be able to have both a setLimit and an addDescendingOrderByColumn at the same time. Is this possible w/o using S

"Fixed", was: Re: setLimit NPEs?

2004-02-16 Thread Dave Newton
On Mon, 2004-02-16 at 15:58, Dave Newton wrote: > If I comment out the setLimit line it all works fine, otherwise I get > the NPE. > > I'm running Torque 3.0.2 (don't ask, don't know) and MySQL, Java 1.4.1 Well, looking through the change logs of Torque 3.1 I found

setLimit NPEs?

2004-02-16 Thread Dave Newton
Howdy, I'm doing something pretty simple and getting an NPE so... maybe I'm just doing something trivially wrong. If I comment out the setLimit line it all works fine, otherwise I get the NPE. I'm running Torque 3.0.2 (don't ask, don't know) and MySQL, Java 1.4.1 Any ideas? I'd feel better if I

Re: How to use trim in select clause

2004-01-21 Thread Dave Newton
On Wed, 2004-01-21 at 01:00, John Varghese wrote: > What is the Torque equivalent for the following > select query run from sql prompt > - > > select * from product_revision where UPPER(TRIM(REVISIO

RE: How do I post messages to the newsgroup?

2003-12-18 Thread Dave Newton
On Thu, 2003-12-18 at 10:00, Prakash, Anton wrote: > Could you help me unregister from this list ? Read the bottom of the email. > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED]

Re: Does Torque Pool Connections

2003-12-17 Thread Dave Newton
On Wed, 2003-12-17 at 17:14, Sonu Vijay wrote: > Does Torque pools connections. It can; the example properties files has a wad of pooling options commented out. (RTFEF? Read The yadda-yadda Example Files?! ;) Dave - To unsubsc

RE: Help Please

2003-12-03 Thread Dave Newton
On Wed, 2003-12-03 at 11:49, Vikas Phonsa wrote: > Out of respect for this list, I didn't want to reply to any more of your > messages but I'm forced to reply to this on before I get out of here. Heck, I _asked_ you not to reply to the list with non-technical things. Twice. Didn't seem to take.

RE: Help Please

2003-12-02 Thread Dave Newton
On Tue, 2003-12-02 at 22:05, Vikas Phonsa wrote: > The very first day I subscribed to the list, the tone of your response was > exactly the same. Yeah--"give more information and read the documentation." I'll almost always have that attitude. It's hard to have too much information when trying to t

RE: Help Please

2003-12-02 Thread Dave Newton
On Tue, 2003-12-02 at 21:47, Vikas Phonsa wrote: > Ok I'm not being a jackass here- I might have my own issues and I have used > mailing list for Ant, Maven, NextObjects, Tomcat, Velocity etc etc but you > are first person who seems to be so upset about things. I'm not upset. I'm frustrated becau

RE: Help Please

2003-12-02 Thread Dave Newton
On Tue, 2003-12-02 at 21:39, Vikas Phonsa wrote: > You know what you don't have to help. Maybe you are smart and I'm dumb ok, > forgive me for posting this message. Please carry on with your important > things. Don't be a jackass--I'd _like_ to help, but if you don't give any information, how can

RE: Help Please

2003-12-02 Thread Dave Newton
On Tue, 2003-12-02 at 21:29, Vikas Phonsa wrote: > Yeah it is very much in the right place. Uh... Where would that place be? You ask a lot of questions and provide essentially no useful information to help solve them--are you surprised that few people are responding to your posts? I replied to

RE: Help Please

2003-12-02 Thread Dave Newton
On Tue, 2003-12-02 at 21:23, Vikas Phonsa wrote: > Ok I'm able to generate the tables in my AS400 database and I'm specifying > the same properties in the Torque.properties to be loaded by my main java > class. Is your torque.properties file in an appropriate place? I just can't imagine having so

Re: Help Please

2003-12-02 Thread Dave Newton
On Tue, 2003-12-02 at 21:11, Vikas Phonsa wrote: > I'm trying to run a main class to test the java classes generated by Torque > and I get the following exception on command line and I have no idea in the > world how to take care of these. Please help. Have you appropriately set your database conn

Re: Performance problems

2003-11-27 Thread Dave Newton
On Thu, 2003-11-27 at 03:21, Josh Holtzman wrote: > Thanks Andras. I thought about doing joins, but I run into this > problem: Not all accounts have an assignment. I still want to show the > accounts with no assignments, and the join keeps any account without an > assignment out of the result

Re: Getting the name(s) of primary columns

2003-11-15 Thread Dave Newton
On Sat, 2003-11-15 at 11:58, Justin Wood wrote: > I would like to get the names of the primary key columns of a table. > but this returns 'ID_TABLE_ID' and the name of my primary key column is simply > 'ID'. > > Is there another way? I believe you've asked for the primary key of the id table

Re: Torque problems with Tomcat and Struts

2003-11-14 Thread Dave Newton
On Fri, 2003-11-14 at 14:31, Branden Root wrote: > [... lots of stuff ...] Is the driver in the appropriate directory? It just seems like it isn't being found. Can you do simple JDBC from a servlet? It might be easier to track down the driver issue that way than wading through Torque. Dave ---

Re: Why? Criteria.LIKE

2003-11-14 Thread Dave Newton
On Mon, 2003-11-24 at 21:09, Toru Suzuki wrote: > String note = "\*comment"; > Criteria cri = new Criteria(); > cri.add(PERSON.NOTE, (Object)(note + "%"), Criteria.LIKE); > > SQL log is > SELECT PERSON.NAME, PERSON.NOTE FROM PERSON > WHERE PERSON.NOTE LIKE '\comment%' > > I expected > WHERE PERS

RE: Can't generate Java Source

2003-11-14 Thread Dave Newton
On Fri, 2003-11-14 at 12:30, Vikas Phonsa wrote: > All the tutorials and articles that I found abt torque say that there > Should be some java class code generated after the above step in the > Src\java directory under the the torque installation dir. > > So I can't figure out what to do. I'm encl

RE: newbie's questions help pls

2003-11-13 Thread Dave Newton
On Thu, 2003-11-13 at 13:25, Vikas Phonsa wrote: > Come on guys, is there no place where someone can learn to use the Torque > 3.1 Just a minor bitch, but... how much are you paying for tech support? If you don't like the lack of support in an open source, free product, then create that support.

Re: create-db.sql: @DATABASE_DEFAULT@

2003-10-14 Thread Dave Newton
On Tue, 2003-10-14 at 23:29, Gedin Frederic wrote: > Check that the name of the database is properly set in id-table-schema.xml. > You should have a line like > > > Hope this helps I had the same problem as Richard. My schema file was "definitely" correct but this issue persisted. I ended up "so

RE: Tables with foreign keys to themselves don't maintain Lists ofrelated rows.

2003-09-23 Thread Dave Newton
On Tue, 2003-09-23 at 17:01, Gary Baker wrote: > No, that's not true, the semantics may seem confusing, but it is > perfectly legal to have a self-referential foreign key (at least in the > databases with which I'm familiar DB2, SQLServer, Oracle). This is > really the only way to build a proper t

Re: Tables with foreign keys to themselves don't maintain Lists of related rows.

2003-09-23 Thread Dave Newton
On Tue, 2003-09-23 at 16:54, Gary Baker wrote: > I've got a table with a foreign key to itself. I'm definitely not an SQL guru (I write printers, fer gosh's sake :) but... isn't a foreign key by definition a key in another table? Dave --

RE: Torque fails to create the tables if the column or table name contains space

2003-09-22 Thread Dave Newton
On Mon, 2003-09-22 at 17:12, Virenderjit Singh wrote: > No replies so far. Is such case a rare or common? Don't know :) I've never (and never would) use spaces in a database column name, just like filenames, because I would have serious concerns about portability. Of course, I rarely use mixed-ca

Re: Depreciated method in generated classes

2003-09-17 Thread Dave Newton
On Wed, 2003-09-17 at 16:22, Seth Milder wrote: > When I compile my om classes, I get this message: > > "getMapBuilder() in org.apache.torque.util.BasePeer has been > deprecated" > > > I am using JDK 1.4.2 and Torque 3.1. Has anyone else seen this? Yeah. It's deprecated. Check out the API

Re: Torque Issues ????? need comments

2003-08-28 Thread Dave Newton
On Thu, 2003-08-28 at 11:05, Brijesh Sood wrote: > how good is the accuracy to not generate two same random number Hopefully right around 1 in biggest_rnd_num... :D > Can anyone would list of Pros-Cons using Torque & whats the future of > torque developement , it is right make use of this

Re: Trouble with schema name in DB2 SQL - torque newbie

2003-08-19 Thread Dave Newton
On Tue, 2003-08-19 at 11:03, Amy Smith wrote: > Is there a way to append a schema name in front of the table name in the > from clause? For a different reason, but with the same effect, I simply modified several of the Velocity templates Torque uses to generate the java code. Perhaps this is one

Re: SQL 2 xml

2003-08-16 Thread Dave Newton
On Sat, 2003-08-16 at 15:12, Sgarlata Matt wrote: > The jdbc ant task will take care of this for you. Just type > > ant -f build-torque.xml jdbc Heck, I didn't know that. Thanks! (And thanks for keeping it on the list; dangling questions w/o known answers don't help the global knowledge pool any

Re: Foreign keys another great mystery... (longish w/ code)

2003-08-14 Thread Dave Newton
On Tue, 2003-08-12 at 15:32, Mark Lowe wrote: > Sorry If the ma gag was a bit heavy.. But so was give me "read the > docs".. You're example is great... My example is a Jython version of the tutorial on the Torque site, which is how ya' learn to use stuff. Worked for me, anyway. Dave "And DANG

Re: Foreign keys another great mystery...

2003-08-14 Thread Dave Newton
On Tue, 2003-08-12 at 12:38, Mark Lowe wrote: > Okay I'm going to make this really easy.. > > Do foreign keys and the subsequent methods generated from such entries > in a schema actually work? Or are they just trying to look nice? Please > tell me somebody, tell me point me to some reading or s

Re: Foreign keys another great mystery... (longish w/ code)

2003-08-14 Thread Dave Newton
On Tue, 2003-08-12 at 13:50, Mark Lowe wrote: > Thanks.. for pointing me to the docs, they're great aren't they i've > been reading them for days, its just a shame that as soon as you try > anything useful they don't seem to be right.. Yeah, Jakarta documentation often leaves much to be desired

Re: Foreign keys another great mystery...

2003-08-12 Thread Dave Newton
On Tue, 2003-08-12 at 13:08, Mark Lowe wrote: > Thanks Dave very helpful... Well done.. Thanks :) Almost as well done as waiting two hours for someone to answer your question, I suppose. > >> Do foreign keys and the subsequent methods generated from such entries > >> in a schema actually work? Y

Deleting all rows from table?

2003-07-29 Thread Dave Newton
Is there a canonical way to delete all records from a table given only a BasePeer class? Thanks, Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

"Dynamic" foreign keys?

2003-06-26 Thread Dave Newton
Hola all, I'm wondering if I can/how I would do the following under Torque. I have several tables that can have zero or more address records (each of which can have zero or more phone records, but whatever). I'd rather not have a separate mapping table for each table that can have address info,