Re: underscore in java bean property

2006-09-13 Thread Nathan Maves
Yeah wrapping the class may be your only alternative. Should be easy and you only need to override the problematic methods. Cheers, Nathan On 9/13/06, Salman Khattak <[EMAIL PROTECTED]> wrote: Thanks Daniel and Nathan. Nathan: The mutators are the problem as they have the same underscore co

RE: underscore in java bean property

2006-09-13 Thread Salman Khattak
Thanks Daniel and Nathan. Nathan: The mutators are the problem as they have the same underscore convention :( Daniel: Since I am extending the class with the non-conventional methods, I guess your suggestion works for now. My class will follow the java bean convention and have setters and gette

Refcursor and postgresql how to make it work ?

2006-09-13 Thread David Gagnon
Hi all, I have seen how to map an oracle refcursor here: http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId=5653 I tried to make it works with postgreql 8.1.4 and the latest driver without success. I know Postgresql complain about jdbcType="cursor" that why I put

Multiple ResultSet's

2006-09-13 Thread Christopher . Mathrusse
I have a problem with the way that Sybase ASE works with stored procs and triggers. I'm working with a legacy database that is very poorly designed. All work is performed using procs and triggers and it's almost impossible to trace it all down. The problem I'm having is that ASE build result

RE: underscore in java bean property

2006-09-13 Thread Daniel Pitts
Even if they don't follow the spec, here is a work around: Create a object wrapper that DOES follow the spec, and it just delegates to the legacy object. If you can, however, I would refactor it to be more appropriate for modern coding practices. -Original Message- From: Nathan Maves [ma

Re: For some reason CDATA doesn't "work" in some queries

2006-09-13 Thread Jeff Butler
Right.  The parser ignores everything in a CDATA section.   I've seen some of those examples too and I think they're promoting ignorance.  There's no need to put CDATA in XML unless you need ask the parser to ignore something.   Jeff Butler   On 9/13/06, Morone, Bill <[EMAIL PROTECTED]> wrote: J

Re: For some reason CDATA doesn't "work" in some queries

2006-09-13 Thread Jeff Butler
Here's some good information about CDATA if you're new to XML:   http://www.w3schools.com/xml/xml_cdata.asp   Jeff Butler   On 9/13/06, Jeff Butler <[EMAIL PROTECTED]> wrote: You've got CDATA arount too much - it's causing iBATIS to ignore the nested dynamic SQL tags.   You only need to use CDATA

RE: For some reason CDATA doesn't "work" in some queries

2006-09-13 Thread Morone, Bill
Jeff,   I agree -- I don't need it in this case -- but every example I've seen has it in the front and back -- suppose I had a nested tag with < >  -- still wouldn't work, right?   Just curious.   Bill   -Original Message-From: Jeff Butler [mailto:[EMAIL PROTECTED]Sent: Wednesday, S

RE: Trying to pass in [oracle] where clause with ' like #variable#' phrase with #variable# already formed

2006-09-13 Thread Morone, Bill
Thanks will do. I'll be in touch.     -Original Message-From: Jeff Butler [mailto:[EMAIL PROTECTED]Sent: Wednesday, September 13, 2006 6:15 PMTo: user-java@ibatis.apache.orgSubject: Re: Trying to pass in [oracle] where clause with ' like #variable#' phrase with #variable# already fo

Re: For some reason CDATA doesn't "work" in some queries

2006-09-13 Thread Jeff Butler
You've got CDATA arount too much - it's causing iBATIS to ignore the nested dynamic SQL tags.   You only need to use CDATA sections if your SQL statements contain XML delimeters like < and >.  And even in that case you can use < and > for greater clarity.   Bottom line - don't use CDATA unless you

Re: Trying to pass in [oracle] where clause with ' like #variable#' phrase with #variable# already formed

2006-09-13 Thread Jeff Butler
No problem.  Look in the Developer's Guide.  There's a section on logging.  This will enable you to see the statement and parameter values as they are sent to the database.   Jeff Butler   On 9/13/06, Morone, Bill <[EMAIL PROTECTED]> wrote: Jeff,   Please forgive my newbie-ness When you say "tur

RE: Trying to pass in [oracle] where clause with ' like #variable#' phrase with #variable# already formed

2006-09-13 Thread Morone, Bill
Jeff,   Please forgive my newbie-ness When you say "turn on logging" what do you mean -- is there a way for me to determine the statement? -Original Message-From: Jeff Butler [mailto:[EMAIL PROTECTED]Sent: Wednesday, September 13, 2006 5:41 PMTo: user-java@ibatis.apache.orgSubject: R

For some reason CDATA doesn't "work" in some queries

2006-09-13 Thread Morone, Bill
Title: For some reason CDATA doesn't "work" in some queries Hello, Maybe it is something I am doing wrong (long history of such circumstances). When I attempt to run this statement, only passing in the userClientId, clientRoles, viewableAcctInsTypeCodes with the CDATA demarcation I get a

Re: Trying to pass in [oracle] where clause with ' like #variable#' phrase with #variable# already formed

2006-09-13 Thread Jeff Butler
On first glance it looks OK to me.  Probably it would help to turn on logging and see the actual statement that is sent to the DB.   Jeff Butler  On 9/13/06, Morone, Bill <[EMAIL PROTECTED]> wrote: Hello, I tried searching the mailing list for "where...like" entries but couldn't find any. I am

Trying to pass in [oracle] where clause with ' like #variable#' phrase with #variable# already formed

2006-09-13 Thread Morone, Bill
Title: Trying to pass in [oracle] where clause with ' like #variable#' phrase with #variable# already formed Hello, I tried searching the mailing list for "where...like" entries but couldn't find any. I am using sqlMaps 2.1.7. I am trying to run this [snippet] statement: ...     and

Re: underscore in java bean property

2006-09-13 Thread Nathan Maves
What do the mutator methods look like? If they follow the bean spec then you should be fine. On 9/13/06, Salman Khattak <[EMAIL PROTECTED]> wrote: Strangely enough some legacy code here has underscore in property names like ministry_Code. IBatis mapping does not like this. Any help would be ap

Re: "queryForList" problem

2006-09-13 Thread Nathan Maves
You need to specify your resultClass as string and then call queryForList On 9/13/06, Okan Çetin <[EMAIL PROTECTED]> wrote: Hi all; I want to get some data from database that using ibatis The code: Integer user_id=usr.getuser_id (); List list=sqlMapper.queryForList("getEventidFromAttendance",

Re: "queryForList" problem

2006-09-13 Thread Jeff Butler
Set your resultClass to java.lang.Integer.  With your current setup, you are asking iBATIS to return a List of Lists.   Jeff Butler  On 9/13/06, Okan Çetin <[EMAIL PROTECTED]> wrote: Hi all;I want to get some data from database that using ibatisThe code:Integer user_id=usr.getuser_id ();List list

Re: "queryForList" problem

2006-09-13 Thread Larry Meadors
Make it resultClass="java.lang.String" or resultClass="string" instead. Larry On 9/13/06, Okan Çetin <[EMAIL PROTECTED]> wrote: Hi all; I want to get some data from database that using ibatis The code: Integer user_id=usr.getuser_id (); List list=sqlMapper.queryForList("getEventidFromAttend

"queryForList" problem

2006-09-13 Thread Okan Çetin
Hi all;I want to get some data from database that using ibatisThe code:Integer user_id=usr.getuser_id ();List list=sqlMapper.queryForList("getEventidFromAttendance",user_id); And the xml file is:..     select event_id from PUBLIC.attendance    where user_id = #user_id#  ..The problem:String sample=

underscore in java bean property

2006-09-13 Thread Salman Khattak
Strangely enough some legacy code here has underscore in property names like ministry_Code. IBatis mapping does not like this. Any help would be appreciated. This is the stack trace: org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL [

Remap resultMap

2006-09-13 Thread Angel Braasch
I have a policy object that is getting mapped in a resultMap.  In that resultMap I have to run another query to get additional properties.   This is a 1:1 situation.  I want to remap those additional properties(from policyDetailResults) back to the original resultMap(policySrcResult).    I

RE: How to pass a parameter with DECIMAL data type

2006-09-13 Thread Poitras Christian
If your passing a double to iBATIS, it won't truncate it to DECIMAL(5,2) before calling the procedure. You should truncate the data yourself to 2 decimals in the procedure or in the sql.   Christian From: Brad Balmer [mailto:[EMAIL PROTECTED] Sent: Tuesday, 12 September 2006 16:59To: user