'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
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
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
() 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 ---
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
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:
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
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:
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
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
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.
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
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
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
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
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
: 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
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
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
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('"
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
: 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
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
:
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
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
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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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
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,
41 matches
Mail list logo