Three things:
1) You should only have one DAO manager, even with multiple databases.
2) In my opinion, your transactions should be at the service
level. Make more coarse grained service methods that demarcate
transactional scope.
3) Be very careful with multiple start/commit/end blocks. You
Two things:
1) What does "did not work" mean? Was there an exception etc?
2) When working with nullable parameters and Oracle, you must specify
the data type (an Oracle/JDBC requirement). So use
#input1:VARCHAR#, or whatever the type may be.
Cheers,
ClintonOn 8/2/05, Rao, Satish <[EMAIL PROTE
Thanks a lot, Niels,
I didn't have CGLIB on classpath and I overlooked the last line in
EnhancedLazyResultLoader where it wraps objects.
Oleg
Niels Beekman wrote:
Hi,
Are you using CGLIB? If not, iBATIS uses the Java
Proxy/Invocationhandler, which only handles interfaces. Somebody please
co
I believe so yes, the docs say:
The value of the map can either be the entire employee object, or
another property from the employee object as specified in the optional
second parameter called valueProperty.
So when you do not specify the valueProperty-property it returns
Student-objects otherwis
Hi,
I use iBATIS with Spring. In fact I learned about iBATIS via Spring; I
think the two together work very well.
In addition to Richard's comments, I would add:
- Common configuration mechanism across your whole project, and separation
of configuration from your code.
With Spring, your DAOs
Sweet wiki here I come!On Aug 4, 2005, at 1:30 PM, Larry Meadors wrote:Yes. Larry On 8/4/05, Nathan Maves <[EMAIL PROTECTED]> wrote: I would hope it is that simple but that leads me to ask about thelast parameter of thequeryForMap(String statementName, Object parameterObject, StringkeyProperty, St
Yes.
Larry
On 8/4/05, Nathan Maves <[EMAIL PROTECTED]> wrote:
I would hope it is that simple but that leads me to ask about thelast parameter of thequeryForMap(String statementName, Object parameterObject, StringkeyProperty, String valueProperty);When using it with your below example would
queryFo
The Spring JDBC wrapper offers at least the following:
- a further abstraction away from iBatis (which is useful if you wish
to change the underlying persistence framework in the future)
- common data access exceptions (i.e. the iBatis exceptions are mapped
to spring exceptions. Again, useful if
I would hope it is that simple but that leads me to ask about the
last parameter of the
queryForMap(String statementName, Object parameterObject, String
keyProperty, String valueProperty);
When using it with your below example would
queryForMap("studentStatement", null, "id", "fname");
r
I would say:
SELECT id, fname, lname
FROM students
queryForMap("studentStatement", null, "id");
this would result in for example:
1 - Student1
2 - Student2
Or is this too simpleminded?
Niels
-Original Message-
From: Nathan Maves [mailto:[EMAIL PROTECTED]
Sent: donderdag 4 augu
Hi,
Are you using CGLIB? If not, iBATIS uses the Java
Proxy/Invocationhandler, which only handles interfaces. Somebody please
correct me if I'm wrong. If you look into EnhancedLazyResultLoader
you'll see that it does not only wrap instances of Collection.
Hope this clarifies something,
Niels
--
Hello,
I'm using lazy loading in iBatis, but this appears to fetch my object
eagerly, effectively increasing the number of statements to exactly N+1.
Lazy loading for collection does work however.
I did some research and found that iBatis does not create proxies for
objects, only for collections.
On Aug 4, 2005, at 11:16 AM, Emiliano Armellin wrote:
Hello
is there away to specify that null strings will be setted to empty string ("") in object result map? Have I got use a TypeHandlerCallback?
--
Emiliano Armellin
W_
www.ateikon.com
@_
[EMAIL PROTECTED]
T_
+39 0422 452101
Hello,
I'm using lazy loading in iBatis, but this appears to fetch my object
eagerly, effectively increasing the number of statements to exactly N+1.
Lazy loading for collection does work however.
I did some research and found that iBatis does not create proxies for
objects, only for collections.
Hello
is there away to specify that null strings will be setted to empty
string ("") in object result map? Have I got use a TypeHandlerCallback?
--
Emiliano Armellin
W_
www.ateikon.com
@_
[EMAIL PROTECTED]
T_
+39 0422 452101
Hello,
I'm using lazy loading in iBatis, but this appears to fetch my object
eagerly, effectively increasing the number of statements to exactly N+1.
Lazy loading for collection does work however.
I did some research and found that iBatis does not create proxies for
objects, only for collectio
Given a student table
id,fname,lname
how would you make the call to return a Map of Students keys on the
studentId?
I think the manual is a bit confusing and I am going to create a wiki
on the topic.
Nathan
Hello,
I'm using lazy loading in iBatis, but this appears to fetch my object
eagerly, effectively increasing the number of statements to exactly N+1.
Lazy loading for collection does work however.
I did some research and found that iBatis does not create proxies for
objects, only for collectio
Abdullah,Can you send me the full sql map of the now working code?I can try and get something on the wiki today.NathanOn Aug 3, 2005, at 12:11 PM, Larry Meadors wrote:Yeah, the wiki is where we try to consolidate the "a-hah!" stuff like this. ;-) http://opensource.atlassian.com/confluence/oss/disp
Please send the complete stack trace.
Larry
On 8/4/05, Vlada Djurovic <[EMAIL PROTECTED]> wrote:
Hi,Iam new user of iBATIS, and i have a weird problem. I searched thearchives and all over the internet, but can't find anything simmilar.I try to do a simple app using SQL-maps tutorial.This is how Is
On Thu, Aug 04, 2005 at 04:33:18PM +0200, Guido Garc??a Bernardo wrote:
> I'm not sure, but that is the problem I suffered running my application
> under Tomcat 4.1.x.
> Logs don't appear with Tomcat, but it works fine with any other server...
> I don't know what is the solution... :(
> iBatis 2.1.
I'm not sure, but that is the problem I suffered running my application
under Tomcat 4.1.x.
Logs don't appear with Tomcat, but it works fine with any other server...
I don't know what is the solution... :(
iBatis 2.1.5 removes commons-logging dependency, but I haven't had the
chance to try it yet
> I'm running the application at Jakarta tomcat 5.0, may be that's the clue?
> An log statements from my application are logged w/o any problems.
and log4j-1.2.9.jar is located under WEB-INF/lib in my application, and
is working fine, just the iBATIS don't see it for some reason :(
--
Eugene N D
On Thu, Aug 04, 2005 at 03:57:34PM +0200, Guido Garc??a Bernardo wrote:
> Maybe you are facing with a commons-logging problem:
> http://mail-archives.apache.org/mod_mbox/incubator-ibatis-user-java/200504.mbox/[EMAIL
> PROTECTED]
>
> Try to make sure there's only one version of log4j in your envir
Ok, so I'll use ResultHandler
great request for developers - please make javadoc for queryForList more
precise!
Michal Malecki
Subject: RE: queryForList with skip max and groupBy feature
i had a look at the src and it is not objects.. It sets the skip on the
resultset...
__
i had a look at the src and it is not objects.. It sets the skip on the
resultset...
From: Michal Malecki [mailto:[EMAIL PROTECTED]
Sent: Thu 04/08/2005 15:04
To: user-java@ibatis.apache.org
Subject: Re: queryForList with skip max and groupBy feature
This is
This is precisely what I was asking for - are the parameters "max" and
"skip" in the queryForList concerning number of rows or objects. If rows - I
understand that I must use ResultHandler; but IMHO it's not clearly written
in the doc what are these two parameters
Michal Malecki
Subject: RE: query
Maybe you are facing with a commons-logging problem:
http://mail-archives.apache.org/mod_mbox/incubator-ibatis-user-java/200504.mbox/[EMAIL
PROTECTED]
Try to make sure there's only one version of log4j in your environment, and
adding the following line:
log4j.logger.java.sql.PreparedStatement=DE
At a guess i would say dont use this way as it would be hard to predict the
number of rows due to the joins unless this is a constant of course..
How are you calculating the number of row to return as you have a join a left
join at that... Due to the joins you will get more than one row per obj
part of sql is:
select ls_name,le_id,le_level,le_message,le_location,le_logger,
le_thread,le_throwable,le_timestamp,le_ndc,lk_name,lea_value
from log_sources, log_events
LEFT OUTER JOIN log_event_attributes on (lea_event = le_id)
LEFT OUTER JOIN log_keys ON (lk_id = lea_key)
where ls_id = le_source
I still facing the problems with the SQL logging :(
I'm using the Log4J and my simple configuration below:
log4j.rootLogger=DEBUG, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPatter
i meant number of objects returned... Caqn u also post the sql..
Cheers,
Steve
From: Michal Malecki [mailto:[EMAIL PROTECTED]
Sent: Thu 04/08/2005 14:15
To: user-java@ibatis.apache.org
Subject: Re: queryForList with skip max and groupBy feature
as far as i a
as far as i am aware there is no such feature so send some more details ie
the xml file with query?
About which feature are you talking about?
groupby:
regards
Michal Malecki
Dzial Uslug Sieciowych
I understand that :) But in this case you would be combining
something like em_num with dept_num. In this case you would have to
place dummy columns with either a null of 0 as a place holder. I
still think that my join is way cleaner and more performant.
Nathan
On Aug 4, 2005, at 12:42
as far as i am aware there is no such feature so send some more details ie the
xml file with query?
From: Michal Malecki [mailto:[EMAIL PROTECTED]
Sent: Thu 04/08/2005 12:52
To: user-java@ibatis.apache.org
Subject: queryForList with skip max and groupBy feature
Hi,
Iam new user of iBATIS, and i have a weird problem. I searched the
archives and all over the internet, but can't find anything simmilar.
I try to do a simple app using SQL-maps tutorial.
This is how Is aet up data source in sqlMapConfig file:
Hello,
I am using groupBy feature to build complex objects, whith array of other
objects. Yestarday I have discovered my mistake in sql - I have used Limit
and offset in postgresql sql, which caused that I got less objects than I
should (few rows create one object). Then I recalled- ibatis has
quer
Can someone who has experience with the Spring Framework please help me
explain briefly what advantages
it could afford /along with/ the use of Ibatis.
What is it that the Spring offers that IBatis does not?
(I know that Spring is multi-facetted, it does AOP stuff etc - but I am
asking specifi
Hi
I use petstore as example so I have:
affairService and debtorService which gives me method like
updateAffair(Domain affair) and updateDebtor(Domain debtor)
Now I want them to be executed in one transaction
I try to do something like this
update() {
...
try {
affairService.getDaoManager().st
39 matches
Mail list logo