Re: Problems using iterate when list is a parameterClass property

2006-05-06 Thread Zarar Siddiqi
't. You need to explicitly specify what the property you want to iterate over is. Like this: Zarar Siddiqi - Original Message - From: Luis Duran To: user-java@ibatis.apache.org Sent: Saturday, May 06, 2006 10:54 AM Subject: Problems using iterate when list is a

Re: RNeed help with Returning different type in resultMap attribute

2006-04-12 Thread Zarar Siddiqi
I think this is what you're asking for: http://opensource.atlassian.com/confluence/oss/display/IBATIS/How+do+I+get+a+Map+of+results+instead+of+a+List Zarar - Original Message - From: "anita m" <[EMAIL PROTECTED]> To: Sent: Wednesday, April 12, 2006 9:36 PM Subject: RNeed help with R

Re: what does the PaginatedList method means ?

2006-04-12 Thread Zarar Siddiqi
All the questions you are asking can be easily answered by writing some code and playing around with paginated lists for about fifteen minutes. Maybe you should consider using DisplayTag instead of paginated lists since that will make your life easier and you won't have to worry about writing J

Re: pager in ibatis

2006-04-12 Thread Zarar Siddiqi
() or previousPage() each time. It's somewhat a manual process. If this is a large query, I'd actually recommend just writing the SQL which efficiently gets the correct set of records that you want. (E.g: LIMIT in MySQL or TOP in SQL Server) Zarar Siddiqi - Original Message ---

Re: [OT] Utility to create DDL from a database

2006-01-19 Thread Zarar Siddiqi
I think most DB Clients like MySQL Front, PostGres Manager etc have an option to "Export as DDL" which does what you're asking for. The export feature is really built into the database (eg: mysqldump). Try looking at Aquafold (http://www.aquafold.com/) and see what it can do for you. What yo

Re: parameter map

2006-01-09 Thread Zarar Siddiqi
It might be because java.util.Map and java.util.List are interfaces and not classes.  I think the defaults in this case will work fine (aka: don't specify anything).  You can also use java.util.HashMap as the parameter class. - Original Message - From: radha rukmani To:

Re: Problems with displaying contents of table

2006-01-07 Thread zarar . siddiqi
can't afford to analyze maps on every single call and does the work once. Altering a table is a fairly large move, are you sure you can't avoid it? Zarar Siddiqi On Sat, 7 Jan 2006, Aladin wrote: > Hello, > > I've just run into a problem and cannot find a solution - p

Re: sql joins in ibatis

2006-01-04 Thread Zarar Siddiqi
Consider using composition:   public class Person {     private Dept dept;     ... }   Then you can use a resultMap and assign values to bean properties by doing:     So you'll have:                 ..   Zarar   - Original Message - From: radha rukmani To:

Re: How to figure out whether the results are coming from the cache?

2005-12-07 Thread Zarar Siddiqi
Well, for development purposes you would just check the IBatis logs when your query executes. I'm not too sure why you would need to know this in a production scenario? - Original Message - From: "Zsolt" <[EMAIL PROTECTED]> To: Sent: Wednesday, December 07, 2005 7:55 AM Subject: Ho

Re: DAO catch SQLexceptions

2005-12-05 Thread Zarar Siddiqi
Some database drivers might even return an error code as part of the Exception. You can examine that and find out exactly what went wrong. For example, IBM's DB2 has a mapping of "error code" => "what went wrong". http://publib.boulder.ibm.com/infocenter/db2help/index.jsp?topic=/com.ibm.db2.u

Re: Nested Lists [signed]

2005-11-17 Thread Zarar Siddiqi
When you're calling "getGamesForChannel", you're specifying the parameterClass as a String whlie you're passing it a channelID which I am assuming is an Integer. Also, regarding this syntax: select="getLeaguesForGame" /> I'm not too sure you can do what you're doing in the column attribute.

Re: How to use nested "

2005-11-04 Thread Zarar Siddiqi
Well, I've posted questions related to nested iterate tags before but with very limited responses. Zsolt, I've tried using nested iterate tags but I've found that the property of the outer iterate tag doesn't seem to expand. Here's the message I posted a while back and got no replies. If any

Re: paginated list

2005-11-03 Thread Zarar Siddiqi
Woah. I was under the impression that internally it's doing what's optimal by considering what database is being used. I noticed the "i believe" in your post. Can you please confirm this? If so, do future releases of IBatis plan on considering the database when using PaginatedList. It doesn't

Nested iterate tags - list not expanding

2005-10-23 Thread Zarar Siddiqi
I'm trying to do a search on some fields using keywords.  Both the keywords and the fields are being passed into the SQL Map but IBatis doesn't seem to expand the property specified in the outer iterate tag.  Both keywords and fields are of type java.util.List and contain java.lang.String ob

Nested iterate tags

2005-10-23 Thread Zarar Siddiqi
I'm trying to do a search on some fields using keywords.  Both the keywords and the fields are being passed into the SQL Map but IBatis doesn't seem to expand the property specified in the outer iterate tag.  Both keywords and fields are of type java.util.List and contain java.lang.String ob

Re: Sybase selectKey problem

2005-10-06 Thread Zarar Siddiqi
Try this as the query. I think you have to select the column as "value". I'm assuming your "deployment" class has a "deploymentId" property. SELECT @@IDENTITY AS value Zarar - Original Message - From: <[EMAIL PROTECTED]> To: Sent: Thursday, October 06, 2005 9:00 P

Re: Select query

2005-10-03 Thread Zarar Siddiqi
: Iterates over a property that is of type java.util.List Example Usage: conjunction="OR"> username=#userNameList[]# Note: It is very important to include the square brackets[] at the end of the List property name when using the Iterate element. These brackets distinguish this object a

Re: Trying to understand selectKey

2005-09-30 Thread Zarar Siddiqi
tation out there but there's enough for a good start. - Original Message - From: "Alan Chandler" <[EMAIL PROTECTED]> To: Sent: Friday, September 30, 2005 5:07 PM Subject: Re: Trying to understand selectKey On Friday 30 Sep 2005 21:42, Zarar Siddiqi wrote: Larry

Re: Trying to understand selectKey

2005-09-30 Thread Zarar Siddiqi
Yes, that would work. You could even do the following: Person aPerson = new Person(); aPerson.setFirstname("Joe"); aPerson.setLastname("Bloggs") Integer id = (Integer) sqlMap.insert("insert", aPerson); // id.intValue() would be the same as aPerson.getPersonId(). This way, you don't have to set

Re: Trying to understand selectKey

2005-09-30 Thread Zarar Siddiqi
Larry made a typo. It's keyProperty, not property. Just look at the docs its all there. Here is a working example currently in production and working fine for me. INSERT INTO mcc_filter ("Name","DateCreated") VALUES (#name#, CURRENT_TIMESTAMP) select currval('"

Re: can't update/insert to postgres db

2005-09-26 Thread zarar . siddiqi
Maybe autocommit is set to false. Try specifying it explicitly by putting the following line in your element. On Mon, 26 Sep 2005, Ben Munat wrote: > Hello. I can't seem to update or insert into a postgres db from ibatis. I > don't get an exception, but when I check the > database the c

Re: Postgres - inserting null causes error - Unknown Types value

2005-09-14 Thread Zarar Siddiqi
: Tuesday, September 13, 2005 12:35 PM Subject: RE: Postgres - inserting null causes error - Unknown Types value I do not know PostgreSql very well, but could it be that you have to explicitly specify the JDBC-type, as in Oracle?   Niels   From: Zarar Siddiqi

Postgres - inserting null causes error - Unknown Types value

2005-09-13 Thread Zarar Siddiqi
I'm having a problem with iBatis using PostgreSql.   I have an insert statment, "insertEndUser" which I pass an "EndUser" object to for inserting.  If all the properties of the EndUser object are non-null, the insert works fine, but if ANY of them are null, I get the following exception, (in

Re: Initial Size of Connection Pool

2005-08-12 Thread Zarar Siddiqi
:               Properties that need to be passed to the driver can be added with the prefix ‘Driver’ as usual.   Hope this helps,   Niels   From: Zarar Siddiqi [mailto:[EMAIL PROTECTED] Sent: vrijdag 12 augustus 2005 18:46To: user-java@ibatis.apache.orgSubject: Initial Size

Initial Size of Connection Pool

2005-08-12 Thread Zarar Siddiqi
Since IBatis implements the DBCP, is there a way to define the "initialSize" property indicating that the connection pool be started off with a custom number of connections.   http://jakarta.apache.org/commons/dbcp/configuration.html     I looked at the docs and see usages of Pool.MaximumAct

Re: Connection Pool

2005-08-09 Thread Zarar Siddiqi
Perhaps you can try getting rid of this or increasing the value because I think this means that a connection should be re-created if it hasn't been requested for more than a second. I could be wrong but try giving it a shot. - Original Message - From: "Ron Kirchheimer" <[EMAIL

Re: DAO Objects - Hiding ?

2005-07-21 Thread Zarar Siddiqi
I'm not too sure what you're getting at. Are you suggesting that it's OK to have a method called "update" or "create" inside your POJO which accesses a datasource? - Original Message - From: "Steve Webb" <[EMAIL PROTECTED]> To: Sent: Thursday, July 21, 2005 7:26 AM Subject: DAO Obj

Re: Nested Beans not populating using SQL alias.

2005-07-18 Thread Zarar Siddiqi
Your column names aren't matching. Try this instead. SELECT baz1 baz2 FROM foo Also, make sure the Bar class has a get/set for baz1 and baz2. Zarar - Original Message - From: "Tom B." <[EMAIL PROTECTED]> To: Sent: Monday, July 18, 2005 10:02 AM Subject: Nested Beans no

Re: problem with Ibatis returning correct number of rows

2005-07-13 Thread Zarar Siddiqi
Are you sure your Bean class is conforming to Java Bean standards?  You shouldn't be naming your member variables "Id", they should be called "id" (what your db column happens to be called), thus giving you getId() and setId() in your bean.     - Original Message - From: ar

Re: Getting UncategorizedSQLException

2005-07-13 Thread Zarar Siddiqi
ld be related to the SQL itself. Could you please dump the complete stacktrace instead of just saying ‘some kind of exception X is thrown’?   Btw, it could be the comma after your last columnselect, just before the FROM-clause…   From:

Re: Getting UncategorizedSQLException

2005-07-13 Thread Zarar Siddiqi
Title: Getting UncategorizedSQLException You're using this:     but not retrieving PLAN_N in your SELECT clause.  I don't know if this is the reason for the UncategorizedSQLException but it's a problem otherwise also. - Original Message - From: Rao, Satish To: user-jav

Re: Getting UncategorizedSQLException

2005-07-13 Thread Zarar Siddiqi
Title: Getting UncategorizedSQLException Try changing  SELECT R.ORD_ID to SELECT R.ORD_ID as ORD_ID and see if it works.   - Original Message - From: Rao, Satish To: user-java@ibatis.apache.org Sent: Wednesday, July 13, 2005 11:49 AM Subject: Getting Uncat

Re: queryForList not returning null

2005-07-13 Thread Zarar Siddiqi
done that. :-) Larry On 7/13/05, Zarar Siddiqi <[EMAIL PROTECTED]> wrote: What I do is that I have a base class (BaseDAOSqlMap) which encapsulates all my data access. In it are methods like getList(String,Object) which calls queryForList which allows me to define custom behavior of

Re: queryForList not returning null

2005-07-13 Thread Zarar Siddiqi
What I do is that I have a base class (BaseDAOSqlMap) which encapsulates all my data access. In it are methods like getList(String,Object) which calls queryForList which allows me to define custom behavior of what getList() returns. That way if the implementation for queryForList() changes (I

Re: problem with delete statement definition , SQL0206 error

2005-07-13 Thread Zarar Siddiqi
nd ENVNAME=#envname# and P204PORD = #ponum# and P204ROUT=#routing# Ashish --- Zarar Siddiqi <[EMAIL PROTECTED]> wrote: You haven't posted the calling code so it's tough to see what might be wrong. But I have a hunch that this might have to do with "SYSTEM" being a rese

Re: problem with delete statement definition , SQL0206 error

2005-07-12 Thread Zarar Siddiqi
You haven't posted the calling code so it's tough to see what might be wrong. But I have a hunch that this might have to do with "SYSTEM" being a reserved keyword so you might have to escape it with back ticks. Thats just a shot in the dark. Also, as far as I can see, just passing in a Map of

Re: I must restart Tomcat when I modify some SQL Map XML files in SQLMapConfig.xml

2005-07-11 Thread Zarar Siddiqi
Instead of restarting Tomcat, perhaps you should setup your application so that you just have to reload/redeploy the context for the startup listeners to kick in.  Restarting tomcat can be slow while reploying works like a breeze.  I'm using Intellij and you can run Tomcat within it. I'm sur

Re: Problem with db2 driver

2005-06-15 Thread Zarar Siddiqi
Can you also post the calling code and maybe the getArrDepList map. Do the two calls that you're making return the same set of data? - Original Message - From: "Esa Kylli" <[EMAIL PROTECTED]> To: ; <[EMAIL PROTECTED]> Sent: Wednesday, June 15, 2005 9:04 AM Subject: RE: Problem with db

Re: problem in linux

2005-06-15 Thread Zarar Siddiqi
Not too sure what you mean by "resources on the classpath". If he's running a webapp, all he needs to do is make sure it's under WEB-INF/classes/com/vico/correng/dao/ibatis/impl/PsrecPipe.xml and iBatis should find it. Remember Linux is case sensitive, so check your case. - Original Me

Re: Multiple Objects as parameters

2005-06-14 Thread Zarar Siddiqi
the database...and disconnecting it artificially in your Java code. From what I can see, that adds no value, and increases the complexity of the system (unneccesarily). Larry On 6/14/05, Zarar Siddiqi <[EMAIL PROTECTED]> wrote: Multiple Objects as parameters Hi, I've encountered a s

Multiple Objects as parameters

2005-06-14 Thread Zarar Siddiqi
Multiple Objects as parameters Hi, I've encountered a situation which I am sure most developers have faced and resolved in their own way when using iBatis. Consider the following scenario. We have two tables: USER(UserId,Name,Age,Occupation) ADDRESS(AddressId,UserId,Street,City,ZipCode,State,