Re: String list in resultMap

2009-06-10 Thread Gwyn Evans
I'm not 100% sure, but it looks to me as if this is the subject of the "Result Maps"/"Complex Collection Properties" section of the "Developer Guide" document. On Wed, Jun 10, 2009 at 3:59 AM, cbchhaya wrote: > > I have the following classes: > class Attribute { >    String attrName; >    List val

Re: Adding programable transactions to a Spring/Ibatis setup?

2009-06-09 Thread Gwyn Evans
e source code of this class: > > http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/test/AbstractTransactionalSpringContextTests.html > > it has plenty of clues on how to do this. > > Cheers, > Alex. > > On Mon, Jun 8, 2009 at 6:22 PM, Gwyn Evans wr

Adding programable transactions to a Spring/Ibatis setup?

2009-06-08 Thread Gwyn Evans
Hi, Does anyone have any guides for adding programmable transactions to a Spring/Ibatis setup? I've got my 'normal' setup using Spring, Ibatis & whatever you get if you don't explicitly configure any transactional behavior. That's been working fine, but I've got one method that's going to need to

Re: iBatis Tomcat log4j IntelliJ IDEA

2008-07-19 Thread Gwyn Evans
Does http://opensource.atlassian.com/confluence/oss/display/IBATIS/JDBC+logging+issuesapply? /Gwyn On Fri, Jul 18, 2008 at 8:42 PM, Tokajac <[EMAIL PROTECTED]> wrote: > > That's exactly the topic here. > My aim is to see SELECT * FROM... , INSERT INTO... > on the console when they're executed >

Re: Oracle setFormOfUse suggestions?

2008-07-14 Thread Gwyn Evans
It was just the one instance I needed this for, so ended up doing it in the Java code, unwinding the connection there with code like this: try { client.startTransaction(); con = unwindConnection(client.getCurrentConnection()); String sqlStmt = "merge into ..."; stmt = co

Re: multiple inserts

2008-07-08 Thread Gwyn Evans
Before you get too far into that, are you sure that the reason that using a 'for' is slow isn't that you're using a seperate transaction/commit for each insert? /Gwyn On Tue, Jul 8, 2008 at 4:09 PM, Felipe Maza <[EMAIL PROTECTED]> wrote: > Hello, > > How can I insert an array of DTOs into a data

Re: inner class

2008-07-08 Thread Gwyn Evans
If it's a non-static inner class, then it can only be instantiated via a member of the containing class - See http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html, for instance - Nothing to do with where the source is... /Gwyn On Tue, Jul 8, 2008 at 3:48 PM, CarloV <[EMAIL PROTECTED]>

Re: spring 2.5.5 and ibatis 2.3.2

2008-07-07 Thread Gwyn Evans
I suspect that you'll find that just X installations won't get anything - I'm running with a Beta but haven't come across any of the issues recently reported, possibly because I'm not doing anything particularly complex. My suspicion is that it'll come down to just adding as much unit test coverag

Re: Ibatis queryForList in Sybase Database

2008-06-26 Thread Gwyn Evans
Could it be using different JDBC drivers (or different versions of the same driver) in the different appservers, and they don't behave the same way? If that doesn't get you anywhere, I'd suggest that you minimise things - ideally to a simple static test case using just JDBC and investigate using t

Re: Re : Remove/trim spaces from generated SQL requests

2008-06-26 Thread Gwyn Evans
omething special >> in Eclipse or with Maven 2 maybe to remove blank spaces ? >> >> Thanks again >> Gilles >> >> - Message d'origine >> De : Gwyn Evans <[EMAIL PROTECTED]> >> À : user-java@ibatis.apache.org >> Envoyé le : Mercredi,

Re: Remove/trim spaces from generated SQL requests

2008-06-25 Thread Gwyn Evans
Simplest way is surely to not to have the spaces in the sql in the first place? /Gwyn On Wed, Jun 25, 2008 at 9:56 AM, Gilles Schlienger <[EMAIL PROTECTED]> wrote: > Hello, > > I can see in the logs that the SQL requests generated by iBATIS (2.3.0.677) > have a lot of spaces between some element

Re: Problem with sql statement, help wanted.

2008-06-23 Thread Gwyn Evans
You've got 'dynamic' SQL for the "${schema1}" part, but for changing the values in the select queries, you just need the normal ibatis usage, i.e. ...between #startYear# and #endYear# and office = #office# Note: This assumes that your parameterClass class (model.AccountExample) has either bea

Re: Check if query exists before executing

2008-06-18 Thread Gwyn Evans
Only way I know of would be to try then catch the resulting SqlMapException - Just a shame that it's not a specific exception rather than the general one... /Gwyn On Wed, Jun 18, 2008 at 4:25 PM, Julio Faerman <[EMAIL PROTECTED]> wrote: > Hello, > > I would like to know if is it possible to chec

New final release?

2008-06-18 Thread Gwyn Evans
Hi, Any timescale for a final 2.3.2 release, as it would be nice to be able to get it from ibiblio! /Gwyn

Oracle setFormOfUse suggestions?

2008-06-12 Thread Gwyn Evans
Hi - I'm windering if anyone's got any suggestions as how it might be possible to use iBatis to replace some raw JDBC coding where there's this sort of Oracle-specific extension in use? pstmt = (OraclePreparedStatement) con.prepareStatement(sqlStmt); ... pstmt.setFormOfUse(3, Ora

Re: No caching / validating cache

2008-06-03 Thread Gwyn Evans
On Tue, Jun 3, 2008 at 12:05 AM, andrew cooke <[EMAIL PROTECTED]> wrote: > Christopher Lamey localmatters.com> writes: >> Do you have this attribute defined in the setting element: >> >> cacheModelsEnabled="true" >> >> In the sqlMapConfig file? > > i did not and you are a hero. it now works p

Re: echo dynamic sql

2008-05-30 Thread Gwyn Evans
Note http://opensource.atlassian.com/confluence/oss/display/IBATIS/JDBC+logging+issues too! /Gwyn On Thu, May 29, 2008 at 12:25 PM, Andrey Rogov <[EMAIL PROTECTED]> wrote: > iBatis Developers Guide, 65 page. > > > 2008/5/29 Prateek Asthana <[EMAIL PROTECTED]>: >> >> Thanks Andre, >> Can you pleas

Re: iBatis gives no error but no results!

2007-11-15 Thread Gwyn Evans
", family.trim()); /Gwyn On 15/11/2007, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Thanks Gwyn, that's done it. > > Regards, > Lucy > > > > > "Gwyn Evans" > <[EMAIL PROTECTED] > .com>

Re: iBatis gives no error but no results!

2007-11-14 Thread Gwyn Evans
It might be that if they're set up as CHAR(5), then you might want to try the following... params.put(new String("family"), new String("CURR ")); params.put(new String("group"), new String("FXD ")); params.put(new String("type"), new String("FXD ")); i.e. Pad the values you're testing agains

Re: Logging oddity

2007-11-13 Thread Gwyn Evans
n't be too difficult to fix I suppose. > > Jeff Butler > > > On Nov 13, 2007 11:23 AM, Gwyn Evans <[EMAIL PROTECTED]> wrote: > > > Hi - wonder if anyone can explain this... > > > > I'm testing with ibatis & am finding that if I have > > >

Logging oddity

2007-11-13 Thread Gwyn Evans
Hi - wonder if anyone can explain this... I'm testing with ibatis & am finding that if I have java.sql.Connection = Info java.sql.PreparedStatement = Debug java.sql.ResultSet = Debug then I don't get *any* ibatis logging, but if I change just the java.sql.Connection value to Debug, then I get th

Re: proper use of start/endTransaction()

2007-11-12 Thread Gwyn Evans
No idea if it's possible, but the first case allows for the transaction being created then an exception being thrown in the 'start' operation, whereas with the second case, that would leave the transaction open. /Gwyn On 12/11/2007, Toby Thain <[EMAIL PROTECTED]> wrote: > Hi, > > A little thought

Re: Oracle date type mapping issue

2007-11-08 Thread Gwyn Evans
Hi Thorsten, Hmm - the first is what I use, i.e. CREATE TABLE XX_LOG ( IDINTEGER NOT NULL, T DATE DEFAULT SYSDATE NOT NULL, ... ) ; and ... and s

Re: Oracle date type mapping issue

2007-11-07 Thread Gwyn Evans
Hi Thorsten, On 07 November 2007, 3:58:47 PM, Thorsten Elfert wrote: > Hi, I use Oracle 9i, JDK 5 and the latest iBatis Release. Whenever I read a date object out of oracle and map it into a java.util.Date attribute the time gets truncated. I tried already to set explicitly the javaType as ja

Re: un-subsribe

2007-10-04 Thread Gwyn Evans
On Thursday, October 4, 2007, 2:28:07 PM, Chandra <[EMAIL PROTECTED]> wrote: > List-Help: > List-Unsubscribe: > Please delete [EMAIL PROTECTED] from the mailing list See the above list headers for where you need to email to un-subscribe. /Gw

Re: insert always returning null (urgent )

2007-09-22 Thread Gwyn Evans
What Brandon was saying was that the information you need is in the manual, so read it rather than posting. /Gwyn On Saturday, September 22, 2007, 6:28:44 AM, Yuvraj <[EMAIL PROTECTED]> wrote: > Hi Brandon,    Thanks for your kind reply. I don’t need any training , if you need please c

Re: Basic mapping in iBatis

2007-07-30 Thread Gwyn Evans
On Sunday, July 29, 2007, 9:27:23 PM, Koka <[EMAIL PROTECTED]> wrote: > Think the problem is in setting order property for each OrderItem. If so, search this list for topic named 'how to deal with one-to-many relationship' (sorry, can not provide direct link - I keep list messages in my g

Re: Basic mapping in iBatis

2007-07-28 Thread Gwyn Evans
On Saturday, July 28, 2007, 12:20:59 AM, HHB <[EMAIL PROTECTED]> wrote: > How can I load an Order with all its order items are fully initialized (no 1 > + N problem please)? Not got a copy to hand, but isn't that explicitly covered in the documentation? You have found the PDF documentation, have

Re: iBATIS Survey (10 Minutes)

2007-07-12 Thread Gwyn Evans
On Thursday, July 12, 2007, 6:51:16 AM, Zoran <[EMAIL PROTECTED]> wrote: > With regards to the Wiki, can I suggest that the v3 page be broken out into > so that the main is only a summary and then link out to separate pages for > the detail of each suggested feature. I found the current structure

Re: Caching frameworks (was Re: iBATIS Survey (10 Minutes))

2007-07-11 Thread Gwyn Evans
On Tuesday, July 10, 2007, 5:38:22 PM, Clinton <[EMAIL PROTECTED]> wrote: > iBATIS 3.0 will change the approach we take to plugins. We'll > probably host plugins somewhere else and open up the access to the > code more than the core. We did that with the Wicket-stuff[*] companion project, which

Re: iBATIS Survey (10 Minutes)

2007-07-11 Thread Gwyn Evans
On Tuesday, July 10, 2007, 5:32:46 PM, Clinton <[EMAIL PROTECTED]> wrote: > Exactly. The random selection is more meaningful than a multiple selection. > But I really have a hard time believing that there's NO primary for > each of those categories. For most of them, yes, but for some, e.g.

Caching frameworks (was Re: iBATIS Survey (10 Minutes))

2007-07-10 Thread Gwyn Evans
I'd rather like to see if there's anything comparing EHCache with JCS, as http://jakarta.apache.org/jcs/JCSvsEHCache.html makes some fairly significant claims about JCS being better. /Gwyn On Tuesday, July 10, 2007, 3:57:31 AM, Clinton <[EMAIL PROTECTED]> wrote: > The cache model is one part of

Re: iBATIS Survey (10 Minutes)

2007-07-10 Thread Gwyn Evans
rmation is lost. It's completely dependent upon what > information we're looking for. And what we're looking for is the MOST > important things to people, not the top three, or even the top two. > Just one and only one. > I want to force you to choose. > Worry n

Re: iBATIS Survey (10 Minutes)

2007-07-09 Thread Gwyn Evans
Hmm, not sure I really agree with you there - having done the survey, there were a number of questions where having to choose just 1 item felt as misleading as choosing all would have been. The correct answers would have been a few of the items. You may believe that one always stands out, but cer

Re: This is really weird...dateformat mapping exception on Integer parameter class

2007-06-28 Thread Gwyn Evans
On Thursday, June 28, 2007, 7:46:22 AM, sepgs2004 <[EMAIL PROTECTED]> wrote: > EXCEPTION > --- Cause: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for > JDBC][SQLServer]Syntax error converting datetime from character string. ... > If we look at teh query in my L.xml > parameterClas

Re: New to iBatis

2007-06-15 Thread Gwyn Evans
On Friday, June 15, 2007, 3:40:39 PM, vinays84 <[EMAIL PROTECTED]> wrote: > I apologize if I'm asking questions that are answered in the dev guide, I'm > just trying to gain a quick understanding. > So, if I have an object defined for a specific table, then I want to include > a query which invo

Re: JNDI - Weblogic - SqlMApConfig

2007-06-14 Thread Gwyn Evans
On Thursday, June 14, 2007, 8:23:05 AM, davypulinckx <[EMAIL PROTECTED]> wrote: Something odd going on then - First thing to grasp is that this isn't anything to do with iBATIS, simply a failure to locate a JNDI item, so don't get focussed in the wrong place. 1) Are you sure the requested data so

Re: JNDI - Weblogic - SqlMApConfig

2007-06-13 Thread Gwyn Evans
On Wednesday, June 13, 2007, 8:16:06 PM, Davy <[EMAIL PROTECTED]> wrote: Strictly, it doesn't have to be "jdbc/..." but it's the convention - See http://docs.sun.com/source/817-6088/jdbc.html for instance. /Gwyn > Thanks Mike,   I will try it tomorrow when I return to the office. May I

Re: Cache object reference

2007-06-06 Thread Gwyn Evans
On Wednesday, June 6, 2007, 11:59:47 AM, Larry <[EMAIL PROTECTED]> wrote: > On 6/6/07, Meindert <[EMAIL PROTECTED]> wrote: >> Is it by design that the object returned from the cache has the same object >> reference as the on in the cache? > In your cache definition, you have readonly="true", but

Re: Database Blocking

2007-06-04 Thread Gwyn Evans
On Monday, June 4, 2007, 7:42:49 PM, Rich <[EMAIL PROTECTED]> wrote: Maybe see if the examples at http://cwiki.apache.org/WICKET/ibatis.html helps you any? /Gwyn > How do you initialize the sqlMap variable or make a call to the queryForList method if you don’t use the SqlMapClientBuilde

Re: Dynamic where clause problem

2006-10-18 Thread Gwyn Evans
On 18/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I am currently depending on one statement to handle returning all rows from a table, as well as returning only some rows based on some keys. The query is as below. But everytime I try to execute this, I get: UncategorizedSQLException:

Re: Abator new Generator Set

2006-09-27 Thread Gwyn Evans
Hi Jeff,  One minor issue I had (till I refactored) in this area was that at one point I set some criteria in a base class, but sometimes wanted to set some additional "AND" clauses in a derived class.  As such, I there needed to re-obtain the (single) Criteria instance, (which I did via example.g

Re: Abator Ibatis with struts example required

2006-09-08 Thread Gwyn Evans
While the other posters have provided you with pointers to Struts & iBATIS, there's a Wiki page here (http://wicket-wiki.org.uk/wiki/index.php/IBATIS) that describes one way of using iBATIS with Wicket, which might be of interest. While the Wicket part won't transfer to Struts, the iBATIS parts

Re: iBATIS v2.2.0 Beta

2006-09-06 Thread Gwyn Evans
nd does the source need to be broken out? Same questions for Javadoc I assume. You're right that the documentation is pretty poor, but I think that getting it published is as simple for us as writing the proper stuff to our internal repository. There is a seperate internal repository for Ma

Re: iBATIS v2.2.0 Beta

2006-09-06 Thread Gwyn Evans
was doing this from scratch, I probably wouldn't, but the earlier uploads have also been renamed to clearly show the versions, so I'm siding with continuing the practice. On 06/09/06, Larry Meadors <[EMAIL PROTECTED]> wrote: On 9/6/06, Gwyn Evans <[EMAIL PROTECTED]> wrote: &g

Re: iBATIS v2.2.0 Beta

2006-09-06 Thread Gwyn Evans
Do you want them there? It's just a matter of creating a basic pom.xml (and since someone's had an earlier version uploaded, there's a base to edit), building a 'dist' jar holding the release file & the pom, then raising an issue in a JIRA. Periodically, the issues are dealt with & the files put

Re: JUnit and iBatis

2006-08-23 Thread Gwyn Evans
Basics of Mocks... http://www.martinfowler.com/articles/mocksArentStubs.html and http://www.devx.com/Java/Article/22599 See http://www.easymock.org/ and http://www.jmock.org/ for two popular libraries. /Gwyn On 23/08/06, Juanjo Cuadrado <[EMAIL PROTECTED]> wrote: my own code... I have been

Re: Multiple Result Set Support complete, 2.2.0 will fly within a week

2006-08-14 Thread Gwyn Evans
On 13/08/06, Clinton Begin <[EMAIL PROTECTED]> wrote: The good news is that I'm on vacation. The bad news is that I spent the last 6 hours watching the first two extended edition Lord of the Rings movies while implementing the Multiple ResultSet support. As a result, to enable it, just set th

Re: error while connecting to ibatis

2006-08-11 Thread Gwyn Evans
Google for "oracle 12505" and see if that helps in any way. It looks to me as it's a pure Oracle issue rather than iBatis (unless you got the datasource configured incorrectly). /Gwyn On 11/08/06, radha rukmani <[EMAIL PROTECTED]> wrote: Hi , I get this error, while connecting to ibatis. jav

Re: IBATIS not working

2006-08-11 Thread Gwyn Evans
You're not the first & you won't be the last... Maybe iBATIS should just flag a warning when it discovers a CHAR column, with the only way to disable the warning being via a setting mentioned only in a section of the doc warning about the need to pad CHAR columns... :-) /Gwyn On 11/08/06, Suman

Re: IBATIS not working

2006-08-11 Thread Gwyn Evans
Might be worth posting the table description, just to see if that suggests anything. /Gwyn On 11/08/06, Sumanta Ghosh <[EMAIL PROTECTED]> wrote: From straight client (sql plus editor) I am getting the row (using same login userid and password) - jdbc I have'nt checked yet. -- View this messag

Re: abator: dynamic order by

2006-08-11 Thread Gwyn Evans
I think you're almost there, but note that you need "$value$" rather than "#value#" there. Maybe compare with the code here (http://www.wicket-wiki.org.uk/wiki/index.php/IBATIS#Oracle_paging) and see the 'notes' at the end of the section /Gwyn On 11/08/06, Thomas Karl Schwaerzler <[EMAIL PROTEC

Re: pagination

2006-08-10 Thread Gwyn Evans
Not sure exactly what you're looking for, but there's a "queryForList(String statementName, Object parameterObject, int skipResults, int maxResults)" method, but note that it works by obtaining all the elements(keys) from the DB then just returning the selected part of the list - if the tables la

Re: pb with cache memory

2006-08-08 Thread Gwyn Evans
As you said, what cache? In your position, I'd be tempted to enable logging for "java.sql" and see if I could work out what & when statements & particularly commits are being sent to the DB. Are you accessing iBATIS via Spring? I'm certainly no expert, but could there be an issue there, somethi

Re: What is purpose of TypeHandler

2006-08-08 Thread Gwyn Evans
lly need them, as if you're new to iBATIS, it'd be better to get the basics working before getting into customisation of this sort. /Gwyn On 08/08/06, Socheat KHAUV <[EMAIL PROTECTED]> wrote: this example is did not show how confige and use it in XML file, it is a bit abstract.

Re: What is purpose of TypeHandler

2006-08-08 Thread Gwyn Evans
Take a look at the "Creating custom Type Handlers" section of the iBATIS-SqlMaps-2.pdf for an example that shows how a java boolean might be mapped to/from "Y" or "N" values in a DB field. /Gwyn On 08/08/06, Socheat KHAUV <[EMAIL PROTECTED]> wrote: can you give me a small example on it ? cuz i

Re: Does JDBC 4.0 make iBATIS redundant?

2006-08-04 Thread Gwyn Evans
As a Wicket user, I'm happy to do a lot of things in Java, but SQL code isn't one of them. That, to me, makes sense to be split out, even leaving aside all the other things iBATIS brings to the party... /Gwyn On 05/08/06, Clinton Begin <[EMAIL PROTECTED]> wrote: Hi all, I just picked this up f

Re: query multiple column with Integer resultClass successfully executed

2006-08-03 Thread Gwyn Evans
Well, from my reading of the docs, that's the expected behaviour (see the "Result Maps/Primitive Results" section of the document). If using "int" by design, the only bug would be using something generating more than 1 property. /Gwyn On 03/08/06, Yusuf <[EMAIL PROTECTED]> wrote: Hi, just stum

Re: IBATIS newbie questions

2006-08-02 Thread Gwyn Evans
I'd suggest that you download "abator" and run that against the DB & let it generate things, as it will provide you with a lot, if not all, of the code you'll need... /Gwyn On 02/08/06, Jonathan Prater <[EMAIL PROTECTED]> wrote: OK, I am an IBATIS newbie and I have a couple of questions... 1.

Re: Phantom data results??

2006-08-01 Thread Gwyn Evans
If you enable logging on "java.sql" you can see the SQL & the params being passed to the DB, and my (on Oracle) experience has been that they match. The whole point of iBatis is that there's not anything like that behind the scenes! Are you 100% sure that you're using the same username on the DB

Re: IBatis causing threads to hang

2006-08-01 Thread Gwyn Evans
Do a thread-dump of a hanging process and examine/post the results? Are you sure it's not just your DB running out of connections or similar? /Gwyn On 01/08/06, Rahesh Kumar <[EMAIL PROTECTED]> wrote: Hi, Sometimes , the queries executed thorugh ibais makes the application hang , how can thi

Re: connections to different databases

2006-07-31 Thread Gwyn Evans
It certainly looks so - I've only got a Spring setup, though... e.g. ${jndi.name} In the above, I'm using a shared dataSource, but the DaoImpls extend Spring's SqlMapClientDaoSupport, which also supports a "dataSource" p

Re: Re-Post:: Same Connection Guaranteed during a Transaction?

2006-07-31 Thread Gwyn Evans
Just from the docs, that looks to be solved by the statements in 2.0 - Is that an option? /Gwyn On 31/07/06, Fred Janon <[EMAIL PROTECTED]> wrote: Sorry for the repost, but I am atill looking for an answer to my question. Basically I need to do an INSERT and get the ID (PK) of the insert in my

Re: MS Access LDB locks using JDBC-ODBC bridge and iBATIS

2006-07-30 Thread Gwyn Evans
Well, I'd still try & take a look to see if there's anything you can do to ensure that all connections are closed, as there's no suggestion that the bridge is not working for you in any other way. /Gwyn On 29/07/06, AlexeyG <[EMAIL PROTECTED]> wrote: Thanks for your responses! MS Access is us