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 "Husek, Paul" <Pa...@pfizer.com> on 2005/12/06 00:21:14 UTC

as400 ordering problem

I'm using torque with the as400 driver.  Most the time it works great.
Lately though I've notice when I do a

 

addAscendingOrderBy() to a criteria I get a sql error:

 

[SQL0171] Argument 1 of function UCASE not valid

 

I'm looking for a quick workaround for this.  I'm not sure I can wait
for a torque patch  Can I add a custom order by where it won't cause
this ucase function to be called?

 

Thanks!

 

Paul

 

 

 


CamelCase, Object Population and Relational Selects

Posted by Trey Long <ja...@provima.com>.
Once again I am appealing to the Torque mailing list for advice on 
decisions coming up in my web enabled Java application. I want to just 
post these few questions as they have come up when we are brainstorming 
some of the issues.

Application: mssql > torque > pojo > axis > xml > coldfusion

Question 1: Is there a way to maintain the CamelCase of the tables 
inside of the torque classes? ex: If I have a table named accountTypes I 
get classes such as AccounttypesBase, AccounttypesPeer and Accounttypes. 
Is it possible to get proper casing out of Torque like AccountTypesBase?

If this isn't currently an option in Torque where could I start my 
research in order to add that bit of functionality. Hopefully the 
problem, if it is a problem, isn't as systemic as I think it could be.


Question 2: We are considering integrating with Torque and the object 
model it creates more tightly. Currently we don't use the generated 
classes much at all besides querying the database then pulling the 
information out of the objects and translating it into something more 
usable from a java perspective. One of the considerations that was 
brought up was how Torque returns related tables. I believe if two 
tables are related it returns them much like a result set in SQL in that 
there is redundant information in every row due to the join. Is there a 
way to easily get the objects in a more variable based format via helper 
classes or some Torque features?

example:
say there is a OM class called Account that relates to Company in the 
database. Is there a way to get an Account object with a List of Company 
instead of a List of Account each one containing a Company object.

What we are trying to avoid is having Axis pump a ton of redundant 
Account information across the wire.


Question 3: I see that there is a way to join against related tables, 
and also a way to join against all related tables except a certain one. 
Perhaps it's a gross oversight on my behalf but is there a way to join 
against ALL relationships?


Thanks for any information or advice on what you have done with your 
applications of Torque. I greatly value the opinions of those more 
learned that myself. -James

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


RE: as400 ordering problem

Posted by Thomas Fischer <fi...@seitenbau.net>.



Hi,

What you can do is to override the method ignoreCaseInOrderBy(String) in
your DB adapter (most probably DBDB2400.java). If you do not know why it
does not work you can just return the argument. Note that if you do this,
all orderBy's will be case sensitive.
Alternatively, you can try to fix its behaviour.

I am afraid there is no way to turn case insensitive ordering off in a
criteria. Look at SQLBuilder.processOrderBy() to see yourself.

If you found out what the problem is and how to fix it, can you please open
up an issue in scarab on the problem ?

    Thomas

"Husek, Paul" <Pa...@pfizer.com> schrieb am 06.12.2005 00:21:14:

> I'm using torque with the as400 driver.  Most the time it works great.
> Lately though I've notice when I do a
>
>
>
> addAscendingOrderBy() to a criteria I get a sql error:
>
>
>
> [SQL0171] Argument 1 of function UCASE not valid
>
>
>
> I'm looking for a quick workaround for this.  I'm not sure I can wait
> for a torque patch  Can I add a custom order by where it won't cause
> this ucase function to be called?
>
>
>
> Thanks!
>
>
>
> Paul
>
>
>
>
>
>
>


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