RE: Just Another Stored Procedure Question

2007-02-22 Thread Yusuf
Hi all, Sorry for the misunderstanding, but it was just a problem of copy and paste.. (because before i tried using parameters passed as raw HashMap).. actually i had this : but still the same problem.. oh and to Mr. Larry, I think the "." characters in the name is no problem, because i've been

Re: parameters in select statements and performance

2007-02-22 Thread Larry Meadors
Yes, almost all databases will cache the execution plans for queries with ? in them. Some will also try to do the same with values in them, too, but that is not as common. Larry On 2/22/07, Mark Volkmann <[EMAIL PROTECTED]> wrote: Just checking my understanding ... Is it the case that select

number of Initial connections

2007-02-22 Thread Tom Henricksen
We have a problem where we exceed our maximum connections on our database. Our setup is here. Does MaximumIdleConnections mean that the database right away grabs 25 connections? Or is that the maximum idle connections before it starts to clean up? I see in the iBatis-SqlMaps-2.pdf it says Pool.

parameters in select statements and performance

2007-02-22 Thread Mark Volkmann
Just checking my understanding ... Is it the case that select statements that use # placeholders perform better than those using $ placeholders when executed multiple times? Is this because the compiled query is saved by the database so it can be reused later with different parameter values

RE: conditionally add a table to the from clause just once if either or both of two parameters is not empty

2007-02-22 Thread Daniel Pitts
Perhaps moving that logic out of your xml file into Java land. Assuming you have a Map as the parameter. boolean useSupplierForParts = Boolean.valueOf(parameters.containsKey("supplierCompanyId") || parameters.containsKey("supplierRef)); Parameters.put("supplierTable", useSupplierForParts ? ", s

Re: [JDBC type = ARRAY / Java type = ?] Deadlock found when trying to get lock (MySQL 5.0 with innodb)

2007-02-22 Thread cmose
No worries, and in all liklihood it isn't an ibatis specific bug, I had just held out hope that someone else might have encountered the issue and arrived at a solution. I've tried both simple and dbcp data sources witht the same results and I'm currently using mysql with innodb tables and row leve

Re: [JDBC type = ARRAY / Java type = ?] conditionally add a table to the from clause just once if either or both of two parameters is not empty

2007-02-22 Thread Tim Azzopardi
less ugly and more obvious to read - thanks Koka Kiknadze wrote: > > > , suppliers_for_parts sp > > > > > , suppliers_for_parts sp > > > > another ugly way I guess. > > -- View this message in context: http://www.nabble.com/conditionally-add-a-table-to-the

Re: Avoiding N+1 Selects

2007-02-22 Thread Brad Handy
iBatis came back with an error message indicating too many objects were being returned for executeQueryForObject. Brad On 2/20/07, Brad Handy <[EMAIL PROTECTED]> wrote: Wouldn't I have to give unique column names for those identifying the child data? For example table parentChild some_fo

Re: [JDBC type = ARRAY / Java type = ?] Deadlock found when trying to get lock (MySQL 5.0 with innodb)

2007-02-22 Thread Koka Kiknadze
I bet noone believes it's an iBatis problem. iBatis is database agnostic, and if there were some general locking issues with inserts/updates they'll affect every user on this list. I've not used MSQL for years, any chance its not using row level locking in your configuration? Have you tryed SIMPL

Re: [JDBC type = ARRAY / Java type = ?] Deadlock found when trying to get lock (MySQL 5.0 with innodb)

2007-02-22 Thread cmose
Did no one ever find a solution to this? I'm getting it left and right when an application crashes and is then restarted... Any advice would be greatly appreciated! Chun Wei Ho wrote: > > Hi! > > We are using apache ibatis with our MySQL 5.0 database (using innodb > tables), in our web applica

Re: [JDBC type = ARRAY / Java type = ?] Support for Primary Key using Composition instead of inheritance

2007-02-22 Thread Jeff Butler
I understand about the psuedo primary key thing and we've discussed it before. My take on it is that it is very simple to write a pseudo "selectByPrimaryKey" function by reusing the selectByExample method. This gives you complete flexibility with how the keys are defined without adding a lot of

Re: [JDBC type = ARRAY / Java type = ?] Support for Primary Key using Composition instead of inheritance

2007-02-22 Thread bkbonner
Jeff, thanks for the information. I'd rather not use a flat type, since many of the keys for this old model I'm working with are composite keys. I looked at the source and found the JavaModelGenerator and the two implementations in the "internal" package. I will look at the extending abator sec

Re: conditionally add a table to the from clause just once if either or both of two parameters is not empty

2007-02-22 Thread Koka Kiknadze
, suppliers_for_parts sp , suppliers_for_parts sp another ugly way I guess.

conditionally add a table to the from clause just once if either or both of two parameters is not empty

2007-02-22 Thread Tim Azzopardi
ibatis2.2 java5 and 6 on winXpSp2 I'm using the code below to conditionally add a table to the from clause of my sql if one or other or both of two parameters is not empty. (The tricky bit is not to include add the table twice). The following works, but I wondered if there was a simpler way that