Re: SQLMap - Fetching ArrayList within an HashMap result

2005-03-18 Thread Vamsee Kanakala
srividhya umashanker wrote: SELECT column_id FROM column_details WHERE tree_id = #value# So, there are multiple column_ids which have the same tree_id. In that case, you shouldn't be using "where tree_id = #value#". It should be "where tree_id in (#value1#, #value2#)" etc. Chan

Re: SQLMap - Fetching ArrayList within an HashMap result

2005-03-18 Thread srividhya umashanker
I use the queryForList() for the outer Select. but still get the same problem. The problem occurs only when i use another linked select where the getColumnDetails returns an arrayList. SELECT column_id FROM column_details WHERE tr

Re: SQLMap - Fetching ArrayList within an HashMap result

2005-03-18 Thread Vamsee Kanakala
srividhya umashanker wrote: /But it throws executeQueryForObject() returns too many rows Exception../ // // /How to go about it??/ / / You should use queryForList, which will give a List of HashMaps. Vamsee.

SQLMap - Fetching ArrayList within an HashMap result

2005-03-18 Thread srividhya umashanker
  I have the following XML entry                  SELECT *  FROM tree  WHERE tree.tree_id = #id#           SELECT column_id  FROM column_details   WHERE tree_id = #value#   Where the resultMap has one entry which is an arrayList.       The java method c

Re: M:N Question

2005-03-18 Thread Amad Fida
Can you provide a simple example for that. All the example I found are single collection property based. Amad Clinton Begin wrote: Yes, either of the M:N solutions should work (either separate select/lazy-load, or join/repeating group mapping). Clinton On Fri, 18 Mar 2005 10:48:49 -0800, Anad Fid

Re: How does iBATIS read the SqlMap files?

2005-03-18 Thread Prashanth Sukumaran
I am sorry i noticed now that you are using 1.0 version of the DTD. So how does this work? iBATIS is backward compatible with version 1.0. Thanks Prasanth. --- Swati Singhal <[EMAIL PROTECTED]> wrote: > Hello, > > Am attaching my sql-map-config file and also the SQL > file. > > > --- Brandon

Re: How does iBATIS read the SqlMap files?

2005-03-18 Thread Prashanth Sukumaran
Hi Swati, I see that the mapped-statement is not a node in the sql-map2.dtd file. Previously in version 1.x ibatis had something like a mapped-statement. This has been replaced with tags like statement, insert, update etc instead of the mapped-statement tag. Look at the JPetStore application y

Re: Question about transactions.

2005-03-18 Thread Mark Alcocer Flores
Thanks Jeff, i knew something of that, but i will chech that out. Also, I will add that attribute to the configuration file and see if it works. Thanks. Mark. The Greatest Thing You'll Ever Learn It's Just To Love And Be Loved In Return

RE: Multiple sql statements inside a single mapped statement

2005-03-18 Thread Gabriel Rosu
I've tried both with and without the ; but still not working. Probably need to look for different oracle jdbc drivers. Thx, gave -Original Message- From: Clinton Begin [mailto:[EMAIL PROTECTED] Sent: Friday, March 18, 2005 12:23 PM To: ibatis-user-java@incubator.apache.org Subject: Re:

Re: Multiple sql statements inside a single mapped statement

2005-03-18 Thread Clinton Begin
Only if your JDBC driver supports it. E.g. Oracle does, MySQL doesn't. Cheers, Clinton On Fri, 18 Mar 2005 12:11:59 -0800, Gabriel Rosu <[EMAIL PROTECTED]> wrote: > > > Hi guys, > Anybody knows if there's a way to have multiple sql statements inside a > single mapped statement, some like th

Re: Multiple sql statements inside a single mapped statement

2005-03-18 Thread Ron Grabowski
Try putting a semi-colon at the end of each line: Insert into table1(...) values(...); Insert into table1(...) values(...); --- Gabriel Rosu <[EMAIL PROTECTED]> wrote: > Hi guys, > Anybody knows if there's a way to have multiple sql statements inside > a single mapped statement, some like this:

Re[2]: DTD not resolving

2005-03-18 Thread Konus-InterCom
WSAD supports Plugin Specified Entries & user Defined Entries, Plugin Specified Entries don't include iBatis files description therefore 1. download DTDs from iBatis.com ( Thanks to Clinton ) and copy these files into your project WEB-INF/.. 2. window . preferences . XML Catalog and 3. New XML

Multiple sql statements inside a single mapped statement

2005-03-18 Thread Gabriel Rosu
Title: Multiple sql statements inside a single mapped statement Hi guys, Anybody knows if there's a way to have multiple sql statements inside a single mapped statement, some like this: Insert into table1(…) values(...) Insert into table1(…) values(...) .. Thx, gabe

Re[2]: DTD not resolving

2005-03-18 Thread Andrey Rogov
WSAD supports Plugin Specified Entries & user Defined Entries, Plugin Specified Entries don't include iBatis files description therefore 1. download DTDs from iBatis.com ( Thanks to Clinton ) and copy these files into your project WEB-INF/.. 2. window . preferences . XML Catalog and 3. New XML

Re: M:N Question

2005-03-18 Thread Anad Fida
Can you please give some example. Just one lines is good enough! Amad Clinton Begin wrote: Yes, either of the M:N solutions should work (either separate select/lazy-load, or join/repeating group mapping). Clinton On Fri, 18 Mar 2005 10:48:49 -0800, Anad Fida <[EMAIL PROTECTED]> wrote: I have a q

RE: Multiple Data Sources

2005-03-18 Thread Rafiq, Adnan
Thanks. I tried it and it works perfectly! -Original Message- From: Clinton Begin [mailto:[EMAIL PROTECTED] Sent: Friday, March 18, 2005 1:43 PM To: ibatis-user-java@incubator.apache.org Subject: Re: Multiple Data Sources Yes. You can specify multiple DAO contexts, each which contains a

Re: M:N Question

2005-03-18 Thread Clinton Begin
Yes, either of the M:N solutions should work (either separate select/lazy-load, or join/repeating group mapping). Clinton On Fri, 18 Mar 2005 10:48:49 -0800, Anad Fida <[EMAIL PROTECTED]> wrote: > I have a quick question and just need to know if I can use any ofM :N > solutions , I have a object

Re: Multiple Data Sources

2005-03-18 Thread Clinton Begin
Yes. You can specify multiple DAO contexts, each which contains a transaction manager and a bunch of DAOs. The DAOs will be bound to the transaction manager in the same context. Clinton On Fri, 18 Mar 2005 12:57:53 -0600, Rafiq, Adnan <[EMAIL PROTECTED]> wrote: > I am also using the iBATIS DAO

RE: Multiple Data Sources

2005-03-18 Thread Rafiq, Adnan
I am also using the iBATIS DAO framework. Can we specify two transaction managers in the dao.xml file? -Original Message- From: Fabrizio Gianneschi [mailto:[EMAIL PROTECTED] Sent: Friday, March 18, 2005 11:30 AM To: ibatis-user-java@incubator.apache.org Subject: R: Multiple Data Sources

M:N Question

2005-03-18 Thread Anad Fida
I have a quick question and just need to know if I can use any ofM :N solutions , I have a object (Parent) with different collection properties. I would like to load them all in one query but if one of them is empty or there is no record that relates to parent for one of the child properties I

RES: RES: PaginatedList & 'google like' results

2005-03-18 Thread Leonardo Holanda
That's what I suggested since the beginning: queryForList(statement, paramObj, (pageNumber * pageSize), pageSize) -Mensagem original- De: Clinton Begin [mailto:[EMAIL PROTECTED] Enviada em: sexta-feira, 18 de março de 2005 14:45 Para: ibatis-user-java@incubator.apache.org; Brandon Good

M:N Question

2005-03-18 Thread Anad Fida
I have a quick question and just need to know if I can use any ofM :N solutions , I have a object (Parent) with different collection properties. I would like to load them all in one query but if one of them is empty or there is no record that relates to parent for one of the child properties I

Re: Question about transactions.

2005-03-18 Thread Jeff Butler
You probably already know this, but... Not every AS/400 table automatically supports transactions. If the table (physical file) is not journalled, then there is no transaction support. This most often happens with physical files created with DDS rather than SQL. It can also be the case with fil

Re: Question about transactions.

2005-03-18 Thread Clinton Begin
Mark, Be sure to set I think I'm going to make this the default in a future release. Cheers, Clinton On Fri, 18 Mar 2005 09:42:05 -0800 (PST), Mark Alcocer Flores <[EMAIL PROTECTED]> wrote: > Actually, this is what I am doing now.I changed all my > calls to this format. Could there be an

Re: RES: PaginatedList & 'google like' results

2005-03-18 Thread Clinton Begin
Wow, it's amazing how something that was included to solve simple problems can create so much confusion. I'm almost ready to suggest we get rid of PaginatedList support! PaginateList is useful for simple requirements. If you need "google-like" pagination, you better not use PaginatedListin f

Re: Question about transactions.

2005-03-18 Thread Mark Alcocer Flores
Actually, this is what I am doing now.I changed all my calls to this format. Could there be any other method that I can call or anything else that I can do? I dont know if it migth be the database i use. It is an AS/400 mainframe. Anyway, thanks for the advice, but if anything else ocurrs to you,

R: Multiple Data Sources

2005-03-18 Thread Fabrizio Gianneschi
I think you should configure (and use) two separate SqlMap instances, with their own xml configuration files. Fabrizio -Messaggio originale- Da: Rafiq, Adnan [mailto:[EMAIL PROTECTED] Inviato: venerdì 18 marzo 2005 17.58 A: 'ibatis-user-java@incubator.apache.org' Oggetto: Multiple Data So

Re: Question about transactions.

2005-03-18 Thread Brandon Goodin
using the following format will work. If your sql fails before commit the end transaction will call rollback. try{ startTransaction ... code goes here commitTransaction } finally { endTransaciton } Brandon On Fri, 18 Mar 2005 09:18:18 -0800 (PST), Mark Alcocer Flores <[EMAIL PROTECTED]>

Question about transactions.

2005-03-18 Thread Mark Alcocer Flores
I have a problem. I recently upgraded from the 1.2 iBatis version to the new 2.0 iBatis version. Because of the database I connect to, I controled transactions manually. I use the startTransaction method to start the transaction and commitTransaction to commit it. If anything went wrong I used the

Multiple Data Sources

2005-03-18 Thread Rafiq, Adnan
My application requires to connect to two databases (configured as DataSource objects). How can iBatis SQLMaps be cofigured to work with two databases within the same application?

R: PaginatedList & 'google like' results

2005-03-18 Thread Fabrizio Gianneschi
I'm used to execute two queries (count + select) for each stament in this kind of situations. The code is hidden in the DAOs, so the business/web layers are not aware of the strategy. The following is the generic method I use: private List executePagedQuery(Object params, int offset,

Re: RES: PaginatedList & 'google like' results

2005-03-18 Thread Brandon Goodin
If you want to abstract from the dependency on IBatis you could always write a class that implements List as well as your own Paging interface. Wrap the Paginated list with your class and delegate calls to the Paginated list where needed. You would persist your wrapper class as you would the Pagina

Re: RES: PaginatedList & 'google like' results

2005-03-18 Thread Brett Gorres
warning about my absolute jumping example: (Sorry I am so chatty this week, but:) My example only makes sense if you also have the next and previous links available as I did (but failed to mention previously). -Brett --- Brett Gorres <[EMAIL PROTECTED]> wrote: > Leonardo: > > I succeeeded usi

Re: RES: PaginatedList & 'google like' results

2005-03-18 Thread Brett Gorres
Oops. I misspoke. I too ran a separate count query like everyone else. (Forgot to mention that part...) The jumping idea is all I have to add here. -Brett

Re: RES: PaginatedList & 'google like' results

2005-03-18 Thread Brett Gorres
Leonardo: I succeeeded using only 1 query with PaginatedList. Btw unless I'm mistaken PaginatedList is tightly coupled to iBATIS but that's a sacrifice of portability one can make for the sake of convenient paging. If you switch from iBATIS, yes you can revisit this dependency and insert differ

RE: Corrupt zip file?

2005-03-18 Thread Engel, Gregory A
It appears to be a JBuilder Issue. I changed the jars while JBuilder was open and then recompiled. Once I close JBuilder and restarted there were no errors. It appears so, however, you can be absolutely certain - try using Winzip to open the file, or better yet, use the 'jar' command like so ..

Re: Corrupt zip file?

2005-03-18 Thread Brice Ruth
It appears so, however, you can be absolutely certain - try using Winzip to open the file, or better yet, use the 'jar' command like so ... jar -tf If that reports an error, you have a bum JAR file. Try a different SF.net mirror. I've had issues w/ them recently. Best, Brice Ruth On Fri, 18 M

Re: PaginatedList & 'google like' results

2005-03-18 Thread Brandon Goodin
Brice, can we put those website links you referenced onto the ibatis wiki under the "Powered By IBatis" section? http://wiki.apache.org/ibatis/Powered_20By_20IBatis Brandon On Fri, 18 Mar 2005 08:24:32 -0600, Brice Ruth <[EMAIL PROTECTED]> wrote: > The product catalogs on www.powersentry.com, w

Re: RES: PaginatedList & 'google like' results

2005-03-18 Thread Brice Ruth
Absolutely true ... of course, as I mentioned, I could put this in a DAO and get around that problem. I just opted not to use a DAO this time, mostly for expediency's sake (as usual). Brice On Fri, 18 Mar 2005 11:32:58 -0300, Leonardo Holanda <[EMAIL PROTECTED]> wrote: > That's nice. The problem

Corrupt zip file?

2005-03-18 Thread Engel, Gregory A
I just downloaded the latest release from source forge. (Had been using earlier release) and I am getting this message when trying to compile against the latest jar files..   "SqlMapPersonDaoFactory.java": Error #: 302 : cannot access class SqlMapClient; java.io.IOException: zip file is cor

RES: PaginatedList & 'google like' results

2005-03-18 Thread Leonardo Holanda
That's nice. The problem in my case is that the Architects in my company does not allow us to put database layer especific code into the web layer code. But, if it's not a problem, thats nice. But remember, if one day you decide to chance iBatis for another framework, you will have to touch the web

Re: PaginatedList & 'google like' results

2005-03-18 Thread Brice Ruth
The product catalogs on www.powersentry.com, www.newpoint.com, www.zincklysbro.dk, and www.wilkinsonswordgarden.com all use PaginatedList to provide the Page [1] 2 3 4 ... functionality. I have a simple Action that looks like this: public ActionForward gotoPage( ActionMapp

RES: PaginatedList & 'google like' results

2005-03-18 Thread Leonardo Holanda
Hi Guido, I had bad time with paginated in web application. I think it's more appropriate to Swing/AWT apps. I'm simply using queryForList(statement, paramObj, (pageNumber * pageSize), pageSize). Leo. -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Enviada em: sexta-

PaginatedList & 'google like' results

2005-03-18 Thread Guido García Bernardo
Hi, I am using ibatis PaginatedList functionality for paging through search results, and I would like to add the ability for a user to go to the last page of the results (something like Google results) instead of having to page through big result sets as it is done in JPetStore4: PREV

Re: How does iBATIS read the SqlMap files?

2005-03-18 Thread Swati Singhal
Hello, Am attaching my sql-map-config file and also the SQL file. --- Brandon Goodin <[EMAIL PROTECTED]> wrote: > urrr sorry...post your sql-map-config.xml file > please. > > Brandon > > > On Fri, 18 Mar 2005 00:56:20 -0700, Brandon Goodin > <[EMAIL PROTECTED]> wrote: > > post your sqlmap > >