RE: Ibatis 3 and null values

2010-07-05 Thread Poitras Christian
Ibatis project moved to Google. If I am not mistaking, the developers of iBATIS are not registered to this list anymore. Please, post your questions to the new list at mybatis-u...@googlegroups.com Christian -Original Message- From: Laurent MANNS [mailto:laurent.ma...@gmail.com] Sent:

RE: Lazy loading differences between ibatis 2 and 3

2009-12-16 Thread Poitras Christian
Hi, The major problem that was present in iBATIS 2 was that lazy loaded class where not always of the right type. For exemple, if I have multiple subclasses of a class. Person Employee inherits Person Director inherits Employee If I have an object Employee with a method getBoss() that returns

RE: Lazy loading differences between ibatis 2 and 3

2009-12-16 Thread Poitras Christian
-- Bardamu On Wed, Dec 16, 2009 at 3:09 PM, Poitras Christian christian.poit...@ircm.qc.ca wrote: Hi, The major problem that was present in iBATIS 2 was that lazy loaded class where not always of the right type. For exemple, if I have multiple subclasses of a class. Person Employee inherits

RE: Lazy loading differences between ibatis 2 and 3

2009-12-16 Thread Poitras Christian
On Wed, Dec 16, 2009 at 4:45 PM, Poitras Christian christian.poit...@ircm.qc.ca wrote: Hi Bardamu, I think it was not clear enough due to the lack of Proxy explanation. If I have an employee and I call getBoss() on it, it has to load the boss property. But what if I call a method like

RE: IB3 Spring Integration

2009-12-02 Thread Poitras Christian
Hi Zoran, I've programmed such an integration for Spring and posted it on the list some time ago. You could find it on some archived iBATIS message board, but it may be difficult. I've added a page to iBATIS wiki

RE: Potential connection problem when using managed transactions in iBATIS 3

2009-11-19 Thread Poitras Christian
: Re: Potential connection problem when using managed transactions in iBATIS 3 Did you already file a Jira ticket for this one? On Wed, Nov 18, 2009 at 1:43 PM, Poitras Christian christian.poit...@ircm.qc.camailto:christian.poit...@ircm.qc.ca wrote: As a workaround, it is easy to create a custom

RE: Potential connection problem when using managed transactions in iBATIS 3

2009-11-19 Thread Poitras Christian
, I think it is usually good form to include your solution to a problem when you post. Not just hey, *I* solved *my* problem, so good luck with yours. From: Poitras Christian [mailto:christian.poit...@ircm.qc.ca] Sent: Thursday, November 19, 2009 7:38 AM To: 'user-java@ibatis.apache.org' Subject

RE: Parameters in Mapper class methods?

2009-11-18 Thread Poitras Christian
You need to add a @Param annotation to your parameters. public interface UserMapper { ListUserDto selectPage(@Param(start) int start, @Param(limit) int limit, @Param(sortFieldName) String sortFieldName, @Param(sortDirection) String sortDirection); Christian

RE: Potential connection problem when using managed transactions in iBATIS 3

2009-11-18 Thread Poitras Christian
, Poitras Christian christian.poit...@ircm.qc.camailto:christian.poit...@ircm.qc.ca wrote: What is the expected behaviour when calling dataSouce.getConnection() for managed transactions in iBATIS 3? I find suspicious that ResultLoader calls dataSouce.getConnection() at line 89 which could create

iBATIS 3 BETA 5 bug

2009-11-04 Thread Poitras Christian
Hi, The correction made to bug https://issues.apache.org/jira/browse/IBATIS-679 is not appropriate in BETA 5. It enters an infinite loop when 2 resultMap point to each other with discrimator tags. For example : resultMap id=personMap type=Person id property=id column=id/

RE: useGeneratedKeys, data not inserted, ibatis 3.0 trunk and sql 2005

2009-10-07 Thread Poitras Christian
Did you call SqlSession.commit() and SqlSession.close()? The usual pattern is SqlSession sqlSession = sqlSessionFactory.openSession(); try { // Do come inserts / updates / deletes sqlSession.commit(); } finally { sqlSession.close(); } Christian From: Thanh

RE: Ibatis 3.0 Bugs/Suggestions

2009-09-21 Thread Poitras Christian
For point 5, it seems type handlers are ignored when simple types are set as resultType. I have a select. select id=selectHasRole resultType=java.lang.Boolean parameterType=ca.qc.ircm.lims.persistence.mapper.AuthenticatingMapper$RoleTest The log does not show my boolean type handler...

iBATIS 3 include

2009-09-18 Thread Poitras Christian
Hi, Is it possible to include an sql segment from another mapper? In SampleMapper, I've defined columns for sample base class. sql id=columns Sample.oid AS 'Sample.oid', Sample.name AS 'Sample.name', Sample.sampleType AS 'Sample.sampleType', Sample.userExperimentationOid AS

RE: iBATIS 3 include

2009-09-18 Thread Poitras Christian
the builder wouldn't crash. Christian From: Poitras Christian [mailto:christian.poit...@ircm.qc.ca] Sent: Friday, September 18, 2009 3:16 PM To: 'user-java@ibatis.apache.org' Subject: iBATIS 3 include Hi, Is it possible to include an sql segment from another mapper

RE: iBATIS 3.0 selectOne SessionException if no data found

2009-08-27 Thread Poitras Christian
How about subclassing SessionException with something like NoResultFoundException? That way, it would be easy to catch the exception (the user mispelled his email, probably) and show a simple error to the user. Christian -Original Message- From: Thomas G. Schuessler

RE: Execute multiple statements (pagination query port from oracle to mysql)

2009-08-24 Thread Poitras Christian
MySQL doesn't need quotes around limit. It should be limit #from# (#from#-#to#+1) http://dev.mysql.com/doc/refman/5.0/en/select.html Christian -Original Message- From: Anoop kumar V [mailto:anoopkum...@gmail.com] Sent: Monday, August 24, 2009 9:13 AM To: user-java@ibatis.apache.org

RE: Why in Application is worked, but in JSP don't worked?

2009-08-24 Thread Poitras Christian
Hi, You can see JSP as being close to an HTML page. It is better if you never put any scripting in a JSP (being % %). Many frameworks exists to simplify the use of JSP in an MVC framework. Strust and Stripes are only a few examples. In Struts you would put you database calls in Action class, in

RE: Execute multiple statements (pagination query port from oracle to mysql)

2009-08-24 Thread Poitras Christian
, as it is a combination of DDL and DML statements...? Thanks, Anoop On Mon, Aug 24, 2009 at 9:39 AM, Poitras Christian christian.poit...@ircm.qc.camailto:christian.poit...@ircm.qc.ca wrote: MySQL doesn't need quotes around limit. It should be limit #from# (#from#-#to#+1) http://dev.mysql.com/doc

RE: Execute multiple statements (pagination query port from oracle to mysql)

2009-08-24 Thread Poitras Christian
You should allow multiple queries if you haven't done so. allowMultiQueries in http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html Christian From: Poitras Christian [mailto:christian.poit...@ircm.qc.ca] Sent: Monday, August

RE: iBatis 3.x.x - documentation error ?

2009-08-14 Thread Poitras Christian
When I tried iBATIS 3, I've done like you naming my interface and my xml with the same name. Don't do that, iBATIS will throw an exception like yours. You should name your interface UserMapper.java and your xml User.xml. Make sure your namespace in User.xml points to your UserMapper interface.

RE: iBatis 3.x.x - documentation error ?

2009-08-14 Thread Poitras Christian
I will file a JIRA. I will also try to make a unit test for it. Christian -Original Message- From: Clinton Begin [mailto:clinton.be...@gmail.com] Sent: Friday, August 14, 2009 12:34 PM To: user-java@ibatis.apache.org Subject: Re: iBatis 3.x.x - documentation error ? Can one of you file

RE: iBatis 3.x.x - documentation error ?

2009-08-14 Thread Poitras Christian
Done. https://issues.apache.org/jira/browse/IBATIS-625 Christian -Original Message- From: Poitras Christian [mailto:christian.poit...@ircm.qc.ca] Sent: Friday, August 14, 2009 1:39 PM To: 'user-java@ibatis.apache.org' Subject: RE: iBatis 3.x.x - documentation error ? I will file a JIRA

RE: iBatis 3.x.x - documentation error ?

2009-08-14 Thread Poitras Christian
I've created a test case too quickly... Next time, I'll get the source from trunk to add a test. Thanks! Christian -Original Message- From: Clinton Begin [mailto:clinton.be...@gmail.com] Sent: Friday, August 14, 2009 2:10 PM To: user-java@ibatis.apache.org Subject: Re: iBatis 3.x.x -

RE: iBATIS 3.0 and Spring 2.5 integration

2009-08-14 Thread Poitras Christian
Thanks. I am looking forward to see Spring support iBATIS 3.0. I've created my own classes to support Spring's transaction. I've included them in this email if it can help someone. Configuration in Spring context. !-- iBATIS 3 -- bean id=ibatisTransactionManager

RE: iBATIS 3 for Java Released (BETA 1)

2009-08-12 Thread Poitras Christian
Hi, When will dtd files be available on apache web site? Christian From: Clinton Begin [mailto:clinton.be...@gmail.com] Sent: Wednesday, August 12, 2009 2:50 PM To: user-java@ibatis.apache.org Subject: Re: iBATIS 3 for Java Released (BETA 1) iBATIS is not a

RE: IsEmpty inside Iterate Tag

2009-07-08 Thread Poitras Christian
Hi, Can you make it work if you put the list inside a map (under key list) and use this? insert id=createObject parameterClass=map Insert into someTable (field1, field2, field3) Values iterate property=list conjunction=, (#list[].field1#, isNotEmpty

RE: Question about Dynamic and iterator

2009-06-23 Thread Poitras Christian
I would try select id=getMyInfi resultClass=com.myclass.Table1 parameterClass=java.util.List SELECT col1, col2 FROM table1 dynamic prepend=where iterate prepend=AND property= open=( close=) conjunction=OR col3=#[]# /iterate /dynamic /select But, you need to have a type handler registered for the

Error iterating over set

2009-02-18 Thread Poitras Christian
Hi, In iBATIS documentation, it is indicated that iterate tag works over any type of java.util.Collection. When I try to iterate over a Set with iBATIS 2.3.4, I get an exception (see end of email). Is it required to give iterate tag a list? Christian

RE: Error iterating over set

2009-02-18 Thread Poitras Christian
) at com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap.getParameterObjectValues(ParameterMap.java:133) at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:181) ... 25 more From: Poitras Christian [mailto:christian.poit

RE: Error iterating over set

2009-02-18 Thread Poitras Christian
really support Sets now. Jeff Butler On Wed, Feb 18, 2009 at 11:12 AM, Poitras Christian christian.poit...@ircm.qc.ca wrote: I'm sorry, I didn't include the right exception. Here's the real stack trace and ParameterObject. public class ParameterObject { private Set idSet; public Set

RE: Turning IBatis Logging off (in JBoss Server)

2009-01-09 Thread Poitras Christian
Try setting java.sql to ERROR. logger name=java.sql level value=ERROR/ /logger Christian -Original Message- From: Daniel Bick [mailto:werbemai...@gmx.de] Sent: Friday, January 09, 2009 6:27 AM To: user-java@ibatis.apache.org Subject: Turning IBatis Logging off (in JBoss

RE: RE: Turning IBatis Logging off (in JBoss Server)

2009-01-09 Thread Poitras Christian
and SqlMapSessions are still in the Log. They seem to be generated in my own classes, although no code exists for this output in these classes. But this is acceptable. Daniel Original-Nachricht Datum: Fri, 9 Jan 2009 08:51:21 -0500 Von: Poitras Christian christian.poit...@ircm.qc.ca

RE: Beginner question on transactions...

2008-11-24 Thread Poitras Christian
-java@ibatis.apache.org Sent: Friday, November 21, 2008 1:35 PM Subject: Re: Beginner question on transactions... The tables were created with Engine=InnoDB mysql 5.0.27 Thx -- pady - Original Message - From: Poitras Christian [EMAIL PROTECTED] To: user-java@ibatis.apache.org

RE: Beginner question on transactions...

2008-11-21 Thread Poitras Christian
Are your tables in InnoDB or MyISAM? InnoDB tables are required in MySQL to support transactions. Christian -Original Message- From: Comcast Mail [mailto:[EMAIL PROTECTED] Sent: Friday, November 21, 2008 1:04 PM To: user-java@ibatis.apache.org Subject: Beginner question on

RE: dynamic CREATE TABLE woe

2008-10-24 Thread Poitras Christian
in method: getProbe(), line: 33 replaced: return GENERIC; by: return BEAN; Hope this will make its way into the main build. regards. Poitras Christian wrote: This is a bug in how iBATIS handles maps inside a list parameter. Curiously, using #[].name# and #[].type# gave the expected result

RE: dynamic CREATE TABLE woe

2008-10-23 Thread Poitras Christian
This is a bug in how iBATIS handles maps inside a list parameter. Curiously, using #[].name# and #[].type# gave the expected result, but not $[].name$ and $[].type$... You can use a simple patch by putting your list of maps inside a map: private MapString, ListMapString, String

RE: queryForList()

2008-10-17 Thread Poitras Christian
It would be better if your code would do one of the following. 1) Use a RowHandler. This is optimized for these kind of queries. 2) Use maxCount in your SQL statement and not in queryForList. Some connectors don't use maximum count to limit the number of results sent from the database. In these

RE: queryForList()

2008-10-17 Thread Poitras Christian
in the SQL statement ? Although the SQL statement will return me a list of objects, how can I put it in SQL statement to return me a range of objects while I do not have idea of how many objects will be returned. Thanks, John Chien Poitras Christian wrote: It would be better if your code would

RE: JDBC.ConnectionURL problem. Changed from 'localhost' to 'IP-number'

2008-09-26 Thread Poitras Christian
Could the username or password be wrong or not used correctly by the datasource? Or maybe the username does not have access to the database... Christian -Original Message- From: xianwinwin [mailto:[EMAIL PROTECTED] Sent: Friday, September 26, 2008 4:52 PM To: user-java@ibatis.apache.org

RE: Ibatis+Spring related: Update over a dblink doesn't update the table

2008-08-28 Thread Poitras Christian
Are you using Spring's transaction management? Look at Spring declarative transactions if you didn't do so. http://static.springframework.org/spring/docs/2.5.x/reference/transaction.html#transaction-declarative Christian -Original Message- From: mailtorakeshp [mailto:[EMAIL PROTECTED]

RE: SELECT containing NULL

2008-07-28 Thread Poitras Christian
On MySQL, you can use = instead of = for null safe comparison. select id=getSomeRecords parameterClass=RecordItem resultClass=long SELECT ColumnUID WHERE Column1 lt;=gt; #property1# AND Column2 = #property2# /select You can also test null values with isNull tag. select id=getSomeRecords

RE: Problem iterating over a list of beans

2008-07-09 Thread Poitras Christian
Putting the List in a Map is a good wayt to be able to specify a property. If you want to use the list directly, I'd try specifying the property in iterate. select id=myObject.dynamicQuery resultMap=myObject_resultmap resultClass=java.util.List select id, name, data, notes from

RE: beginner spring+ibatis help

2008-06-30 Thread Poitras Christian
Hi, First I'd make my SqlMap class extends SqlMapClientDaoSupport from Spring since it will relieve you of writing a try-catch block. public ListProduct getProductList() throws DataAccessException { logger.info(Getting products! (iBatis)); ListProduct allProducts =

RE: Using Struts with Spring DAO's in IBATIS

2008-06-30 Thread Poitras Christian
Hi, I've done something close to this (my actions did not depend on Spring directly). I've been using Struts/iBATIS Dao/SqlMap for a while. I've changed to Spring Dao. To use DI in an semi-automatic way, I've used the @SpringBean annotation from Stripes (since Spring didn't support annotations

RE: beginner spring+ibatis help

2008-06-30 Thread Poitras Christian
(ProductDao productDao) { this.productDao = productDao; } ... } public interface ProductManager extends Serializable { public void increasePrice(int percentage); public ListProduct getProducts(); } -- Dan Guido On Mon, Jun 30, 2008 at 7:48 AM, Poitras Christian [EMAIL PROTECTED] wrote

RE: iBATIS Batching with Spring DAO

2008-03-05 Thread Poitras Christian
You have an example here: http://static.springframework.org/spring/docs/2.5.x/reference/orm.html#orm-ibatis-template Christian From: Jesse Reimann [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2008 10:19 AM To: user-java@ibatis.apache.org Subject: iBATIS

RE: Ibatis with struts

2008-01-08 Thread Poitras Christian
This will help you. http://www.learntechnology.net/content/ibatis/spring_ibatis.jsp Christian -Original Message- From: irene23 [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 08, 2008 10:28 AM To: user-java@ibatis.apache.org Subject: Ibatis with struts Hi, I understand struts, but

RE: Best way to insert thousands of records

2007-12-18 Thread Poitras Christian
the data into the database (even if it's in the wrong place) then do the juggling there - odds are if the data set is huge (300k rows), it'll be faster to do stuff with it in the database then manipulate it. Larry On Dec 17, 2007 3:37 PM, Poitras Christian [EMAIL PROTECTED] wrote: Thanks a lot

Best way to insert thousands of records

2007-12-17 Thread Poitras Christian
Hi! I would like to have your opinion on the fastest way to insert 300k rows into a database. Here are 2 ways I tought about. Method 1 : startBatch(); for (int i = 0; i myObjects.size(); i++) { insert(MyObject.insert, myObjects.get(i)); } executeBatch(); SqlMap insert id=insert INSERT

RE: Best way to insert thousands of records

2007-12-17 Thread Poitras Christian
, 2007 3:00 PM, Poitras Christian [EMAIL PROTECTED] wrote: Hi! I would like to have your opinion on the fastest way to insert 300k rows into a database. Here are 2 ways I tought about. Method 1 : startBatch(); for (int i = 0; i myObjects.size(); i++) { insert(MyObject.insert

RE: Best way to insert thousands of records

2007-12-17 Thread Poitras Christian
, prop2) iterate property= open=( close=) conjunction=), ( #prop1.id#, #prop2.id# /insert -Original Message- From: Poitras Christian [mailto:[EMAIL PROTECTED] Sent: Monday, December 17, 2007 5:26 PM To: user-java@ibatis.apache.org; [EMAIL PROTECTED] Subject: RE: Best way to insert

RE: Best way to insert thousands of records

2007-12-17 Thread Poitras Christian
faster than going the JDBC at all. On 12/17/07 3:14 PM, Larry Meadors [EMAIL PROTECTED] wrote: Do we have to use iBATIS...or Java for that matter? Larry On Dec 17, 2007 3:00 PM, Poitras Christian [EMAIL PROTECTED] wrote: Hi! I would like to have your opinion on the fastest way

RE: Lazy Load is pre loading 1-1 relationships

2007-09-11 Thread Poitras Christian
I doubt my reply will answer your question, but this is mostly for information purpose. All final classes are never lazy loaded by iBATIS. This include any primitive type, Strings and this like Integer, Double, etc... This bug is probably due to the fact that cglib tries to extend the class. If

RE: Lazy Load is pre loading 1-1 relationships

2007-09-11 Thread Poitras Christian
to be the ones that I added serialVersionUID to. Thanks for the help... Poitras Christian [EMAIL PROTECTED] 09/11/2007 12:22 PM Please respond to user-java@ibatis.apache.org To user-java@ibatis.apache.org cc Subject RE: Lazy Load is pre loading 1-1 relationships I doubt my

RE: Problem accessing a HashMap

2007-09-10 Thread Poitras Christian
It would be easier with a List of Maps. Put the information in the Map and plug this kind of code. insert id=insertCustomerProductRel parameterClass=CustomerDTO INSERT INTO PLC.CUSTOMER_PRODUCT_REL (CUSTOMER_ID, PRODUCT_ID) VALUES iterate

RE: Problem accessing a HashMap

2007-09-10 Thread Poitras Christian
#,#products.value#) David Poitras Christian wrote: It would be easier with a List of Maps. Put the information in the Map and plug this kind of code. insert id=insertCustomerProductRel parameterClass=CustomerDTO INSERT INTO PLC.CUSTOMER_PRODUCT_REL (CUSTOMER_ID, PRODUCT_ID

RE: ORA-01795: maximum number of expressions in a list

2007-07-12 Thread Poitras Christian
For point 2 - I don't think it's possible right now, but creating a patch for this should be easy. Christian -Original Message- From: indone [mailto:[EMAIL PROTECTED] Sent: Thursday, 12 July 2007 12:06 To: user-java@ibatis.apache.org Subject: RE: ORA-01795: maximum number of expressions

RE: transaction rollback

2007-07-04 Thread Poitras Christian
Spring calls rollback only when a RuntimeException is encountered. Normal exceptions cause commits (unless stated otherwise in @Transactional mailto:[EMAIL PROTECTED] tag). This may be the cause of your problem. If this is not the case, what database are you using? And can you send your

RE: transaction rollback

2007-07-04 Thread Poitras Christian
=positionManager class= x.y.impl.position ManagerImpl property name= positionDao ref= positionDao/ /bean From: Poitras Christian [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 04, 2007 6:59 PM To: user-java@ibatis.apache.org Subject: RE: transaction

RE: Database Blocking

2007-06-04 Thread Poitras Christian
Impl.java:95) at com.sal.services.retail.storemaint.dao.StoreMapper.findAncillaryInfo(Sto reMapper.java:149) Its like iBATIS doesn't pick up on the spring transaction. Thoughts? From: Poitras Christian [mailto:[EMAIL PROTECTED] Sent: Friday, June 01

RE: Database Blocking

2007-06-04 Thread Poitras Christian
); //error thrown here ... ... From: Poitras Christian [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 11:20 AM To: user-java@ibatis.apache.org Subject: RE: Database Blocking If you want to use Spring transaction, you should let Spring handle them

RE: Database Blocking

2007-06-04 Thread Poitras Christian
Blocking How do you initialize the sqlMap variable or make a call to the queryForList method if you don't use the SqlMapClientBuilder? From: Poitras Christian [mailto:[EMAIL PROTECTED] Sent: Monday, June 04, 2007 1:33 PM To: user-java@ibatis.apache.org

RE: Database Blocking

2007-06-01 Thread Poitras Christian
If you plan to use Spring transaction, you should remove the one in SqlMapConfig.xml. It is quite probable that they can block each other... Christian From: Reese, Rich R. [mailto:[EMAIL PROTECTED] Sent: Friday, 01 June 2007 17:34 To:

RE: converting iBATIS framework DAOs to the Spring Framework

2007-04-13 Thread Poitras Christian
2007 09:59 To: [EMAIL PROTECTED] Subject: RE: converting iBATIS framework DAOs to the Spring Framework Another framework? How much work is it to convert an existing project (like jpetstore)? -Original Message- From: Poitras Christian [mailto:[EMAIL PROTECTED] Sent: 12 April 2007 03:57 PM

RE: converting iBATIS framework DAOs to the Spring Framework

2007-04-13 Thread Poitras Christian
Download CGLIB (at least version 2.1.3) http://sourceforge.net/project/showfiles.php?group_id=56933 Christian From: Meindert [mailto:[EMAIL PROTECTED] Sent: Friday, 13 April 2007 12:03 To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: converting iBATIS

RE: converting iBATIS framework DAOs to the Spring Framework

2007-04-12 Thread Poitras Christian
I also suggest to use Stripes to cut the size of Spring config file. By adding @SpringBean annotation in front of properties (event private), Stripes will fill these properties by simulating the auto-wire process of Spring (even if no setter/getter/constructor exists). For instance, if I have a

RE: iBATIS, Spring, and transactions...

2007-04-10 Thread Poitras Christian
Here is my config file for Spring. It uses transaction with annotation. @Transactional can be put before method or class declaration to make the method/class transactional. (see Spring documentation for more details). !-- Transaction handling -- tx:annotation-driven

RE: iBATIS, Spring, and transactions...

2007-04-10 Thread Poitras Christian
want, I can help with proofing, etc. Maybe someone else would be willing to provide a *simple* iBATIS DAO sample application that we could convert and then document the process. Larry On 4/10/07, Poitras Christian [EMAIL PROTECTED] wrote: I have to say that it would be really nice to have an how

RE: iBATIS, Spring, and transactions...

2007-04-10 Thread Poitras Christian
; public TheService (TheDao theDao){ this.theDao = theDao; } Kind Regards Meindert -Original Message- From: Poitras Christian [mailto:[EMAIL PROTECTED] Sent: 10 April 2007 04:25 PM To: user-java@ibatis.apache.org; [EMAIL PROTECTED] Subject: RE: iBATIS, Spring

RE: Polymorphism question

2007-03-23 Thread Poitras Christian
Hi. You can always do some left joins with the id. Something like. Select id, col1, col2, type, colX, colY, colZ, colW From BaseTable LEFT JOIN ChildTable1 ON BaseTable.id = ChildTable1.id LEFT JOIN ChildTable2 ON BaseTable.id = ChildTable2.id Then any resultMap for these will work since the

RE: output parameters (register output parameters failed).

2007-01-30 Thread Poitras Christian
Does anyone know if it is possible to have a parameterMap with OUT parameters and a resultMap for the same procedure? Christian From: Diego Umpierre [mailto:[EMAIL PROTECTED] Sent: Monday, 29 January 2007 16:16 To: user-java@ibatis.apache.org Subject: output

RE: Problem with fetching data in one to many relationship

2007-01-18 Thread Poitras Christian
Remove CDATA in second request. The CDATA prevents your second request from working. Or better, remove it everywhere and use gt; and lt; instead of and . Christian From: Band, Aniket [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 January 2007 16:49 To:

RE: IN - representation in IBATIS

2007-01-11 Thread Poitras Christian
Look at the iterate tag. Christian From: Adnan Atic [mailto:[EMAIL PROTECTED] Sent: Thursday, 11 January 2007 15:36 To: user-java@ibatis.apache.org Subject: IN - representation in IBATIS I am not sure how to represent this SQL construct in ibatis sql config

RE: iBATIS in Action -- Lazy loading only works with Lists??

2007-01-10 Thread Poitras Christian
I'm sure you need a List interface. Set is very unlikely to work since iBATIS does not produce Sets. Christian From: Todorovich, Milo [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 January 2007 12:24 To: user-java@ibatis.apache.org Subject: iBATIS in Action

RE: Caching Performance

2007-01-10 Thread Poitras Christian
Cache use your request (and parameters) to save results. In case1, the saved result is one query matching the complete ListUser. When querying 'select * from employees where id=#id#' it cannot match query 'select * from employees' and the cache is not used. But if you query 'select * from

RE: Lazy Loading

2006-12-20 Thread Poitras Christian
That's right. This should be written somewhere (like iBATIS wiki). I've run into these 3 problems myself... Christian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 20 December 2006 01:43 To: user-java@ibatis.apache.org Subject: RE: Lazy Loading

RE: Lazy Loading

2006-12-20 Thread Poitras Christian
* *hint* :-D Larry On 12/20/06, Poitras Christian [EMAIL PROTECTED] wrote: That's right. This should be written somewhere (like iBATIS wiki). I've run into these 3 problems myself... Christian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, 20

RE: Dynamic Mapped Statement Iterate Question

2006-11-22 Thread Poitras Christian
This is ok. Christian -Original Message- From: Warren [mailto:[EMAIL PROTECTED] Sent: Tuesday, 21 November 2006 19:24 To: user-java@ibatis.apache.org Subject: Dynamic Mapped Statement Iterate Question I want to pass a list of objects to a SQL map and get the following SQL Statement

RE: Multiple Records in ActionForm

2006-11-07 Thread Poitras Christian
Look at the iterate tag. -Original Message- From: Mustafa DASGIN [mailto:[EMAIL PROTECTED] Sent: Tuesday, 07 November 2006 05:00 To: user-java@ibatis.apache.org Subject: Multiple Records in ActionForm Hi, I have an actionform like below: public class StudentListForm { private

RE: Complex properties on insert

2006-11-02 Thread Poitras Christian
Yes. To access complex properties, it is as simple as writing property access for BeanUtils. Like this : insert id=insertAdress parameterClass=Address INSERT INTO Address(id, countryId) VALUES (#id#, #country.id#) /insert -Original Message- From: Carlos Cajina [mailto:[EMAIL PROTECTED]

RE: how to iterate a property of array of objects and using isEqual tag to compare an attribute ex:(id) of this object with a value. ex: list[].id

2006-10-27 Thread Poitras Christian
What version of iBATIS are you using? Christian From: Niels Beekman [mailto:[EMAIL PROTECTED] Sent: Friday, 27 October 2006 05:45To: user-java@ibatis.apache.orgSubject: RE: how to iterate a property of array of objects and using isEqual tag to compare an attribute ex:(id) of this object

Properties not loaded after first null

2006-10-23 Thread Poitras Christian
Is this bug fixed? I have a this resultMap. resultMap id="visibilityFavoriteResult" class="VisibilityFavorite" result property="oid" column="oid"/ result property="main" column="main"/ result property="owner" column="ownerOid" select="User.getUserByPK"/ result property="group"

RE: Update Primary Key Using Primary Key

2006-10-18 Thread Poitras Christian
Both of your suggestions are ok. Personnally, I would use a Map. Unless you already have a parameter class. For the Map, just add your object and old column2 value in the Map and use this. update table set column2 = #object.column2# where column1 = #object.column1# and column2 = #oldColumn2#

RE: Problem inserting many rows

2006-10-16 Thread Poitras Christian
Try inserting with batches (possibly one transaction per batch). I think MySQL takes a lot of time creating and commiting transactions, so inserting one object at the time is slow... Christian -Original Message- From: Carsten Zeitz [mailto:[EMAIL PROTECTED] Sent: Monday, 16 October

RE: Problem Using Iterate

2006-10-12 Thread Poitras Christian
You should also use the property attribute in your iterate tag (see iBATIS doc). It is likely that you will need '$' instead of '#' to make it work. select id="getSVMarketCC" parameterClass=" java.util.Map" resultClass="salesVariance" select typeName, sum(totalUnits) units,

RE: Invalid Number

2006-10-11 Thread Poitras Christian
A better way would be to pass the parameter as a List (or array) of int and use the iterate tag (see ibatis doc). Christian -Original Message- From: sonusgr [mailto:[EMAIL PROTECTED] Sent: Wednesday, 11 October 2006 08:44 To: user-java@ibatis.apache.org Subject: Re: Invalid Number

RE: updates with complex property

2006-10-11 Thread Poitras Christian
Thatxmlseems ok to me. And #obj2.id# isvalid. Are you experiencing any problems? Christian From: Pecelis, Sergio [mailto:[EMAIL PROTECTED] Sent: Tuesday, 10 October 2006 12:27To: user-java@ibatis.apache.orgSubject: updates with complex property I'm new at iBatis. I do not know how

RE: Multiple results maps

2006-10-06 Thread Poitras Christian
Try returning thecolumns in the order of your result map. I can't say it could work, but it's worth trying. Christian From: Nathan Maves [mailto:[EMAIL PROTECTED] Sent: Thursday, 05 October 2006 17:43To: user-java@ibatis.apache.orgSubject: Multiple results maps Here is the setuptwo

RE: lazy loading confusion

2006-09-27 Thread Poitras Christian
It works for me. Maybe your application is accessing the members property when the object is populating. Try to turn on logging and see what happens. Add a log statement in your members property getter to be sure. Christian -Original Message- From: Tom Duffey [mailto:[EMAIL PROTECTED]

RE: lazy loading confusion

2006-09-27 Thread Poitras Christian
On Sep 27, 2006, at 9:28 AM, Poitras Christian wrote: Maybe your application is accessing the members property when the object is populating. Try to turn on logging and see what happens. Add a log statement in your members property getter to be sure. Did this. The getter is never called

RE: lazy loading confusion

2006-09-27 Thread Poitras Christian
, then maybe it is the Spring configuration that is problematic. Christian -Original Message- From: Tom Duffey [mailto:[EMAIL PROTECTED] Sent: Wednesday, 27 September 2006 10:44 To: user-java@ibatis.apache.org Subject: Re: lazy loading confusion On Sep 27, 2006, at 9:40 AM, Poitras Christian

RE: lazy loading confusion

2006-09-27 Thread Poitras Christian
TIS about why it thinks it needs to load the association? Tom On 9/27/06, Tom Duffey [EMAIL PROTECTED] wrote: On Sep 27, 2006, at 9:40 AM, Poitras Christian wrote: Try to turn on enhancement (also add needed jar) for lazy loading and see what happ

RE: lazy loading confusion

2006-09-27 Thread Poitras Christian
confusion On Sep 27, 2006, at 11:09 AM, Poitras Christian wrote: What is the type of your "members"property. Remember that final objects cannot be lazy loaded. If you are using a final object in your "members" property, iBATIS will definetly load it even in

RE: lazy loading confusion

2006-09-27 Thread Poitras Christian
Oups. Forgot to tell you to change User[] to List prior to posting logssince I doubt User[] can be overiden. Christian From: Poitras Christian [mailto:[EMAIL PROTECTED] Sent: Wednesday, 27 September 2006 13:06To: user-java@ibatis.apache.orgSubject: RE: lazy loading confusion I can't see

RE: dynamic tables names in query problem

2006-09-25 Thread Poitras Christian
The reason value[] doesn't work is because someone may want to write something like this. Object MyObject having a property values which is a List of MyObjects. Then the iterate tag would be confused in front of a line like this. iterate property=values some sql #values[]# /iterate Ouch I

RE: Remap resultMap

2006-09-15 Thread Poitras Christian
Try this. resultMap id="policySrcResult" class="Policy" result column="POLICY_NUMBER" property="policyNumber" jdbcType="VARCHAR" / result column="POL_TYPE" property="polType" jdbcType="VARCHAR" / result column="BUSINESS_ENTITY" property="busEntity" jdbcType="VARCHAR" / result

RE: Remap resultMap

2006-09-15 Thread Poitras Christian
ype="VARCHAR" / result column="YRS_IN_BUS" property="yrsInBus" jdbcType="VARCHAR" / result property="policyDetail" column="{polType=POL_TYPE,policyNumber=POLICY_NUMBER}" select="getPolicyDetail"/ /resultMap Thanks again for an

RE: Remap resultMap

2006-09-15 Thread Poitras Christian
take the results of the below policyDetail property (which includes busEntity,yrsInBus) and re-assign them to policySrcResults' busEntity and yrsInBus properties. resultMap id="policySrcResult" class="Policy" result column="POLICY_NUMBER" property="policyNumber" jdbcType

RE: How to pass a parameter with DECIMAL data type

2006-09-13 Thread Poitras Christian
If your passing a double to iBATIS, it won't truncate it toDECIMAL(5,2) before calling the procedure. You should truncate the data yourself to 2 decimals in the procedure or in the sql. Christian From: Brad Balmer [mailto:[EMAIL PROTECTED] Sent: Tuesday, 12 September 2006 16:59To:

RE: bug in javabeans setter (ComplexBeanProbe.java)?

2006-08-31 Thread Poitras Christian
HashMap object, say X, and before calling X.put(Key1, Value1), the code calls setMyHashMap(X), and THEN it calls X.put(Key1, value1), but by this time X no longer refers to the same object as myHashMap. Hope this makes sense. Regards, Adam -Original Message- From: Poitras Christian

  1   2   >