Re: custom type handler w/ database-specific type

2009-02-08 Thread John . C . Cartwright
Thanks for your reply Rob. Yes, in this case I do need the DataSource, or more specifically the OracleConnection. The class that I'm using to convert a JTS Geometry to SDO_Geometry requires it (not quite sure why). I was hoping to inject the DataSource using Spring, but since I don't control the

Re: RE: custom type handler w/ database-specific type

2009-02-08 Thread John . C . Cartwright
Thanks for your reply Rahul. Specifying the handler class in the inline parameter map works (I was using the fully qualified class name so I guess the typeAlias was not required). I'm perplexed that reading types from the database worked using the globally- registered typehandler, but writing to

Use Spring to create TypeHandler instance?

2009-02-06 Thread John . C . Cartwright
Hello All, Is there a way to get ibatis to use a Spring-managed bean for it's custom TypeHandlerCallback implementation? Is there a different way to get access to the DataSource used by the SqlMapClient? Thanks! --john

Migrating away from Hibernate

2008-03-27 Thread C.
Hi list! My primary goal is to take a large applications with hundreds/thousands of classes that use hibernate annotations and migrate it over to Ibatis. My secondary goal would be to take a large application with hibernate mapping files and convert them over to Ibatis.. I've looked on the FAQ a

RE: discriminator and submap

2008-02-13 Thread c . zecca
"Niels Beekman" <[EMAIL PROTECTED]> scritti il 12/02/2008 22:37:21 > Hi, > > I?m not familiar with the decode function, but I would check the > ResultSet debug logging and see if ?decode( IDENTIFICATORI_VALORE. > TIPO_RIGA_ID, null, 0, 1) as DI_TIPO_RIGA? actually returns the > results you?re e

Re: discriminator and submap

2008-02-12 Thread c . zecca
> Niels Beekman > Sat, 04 Nov 2006 03:35:52 -0800 > If only if/else behaviour is required, why not create an additional > column? Something like: [...] Hi all Following the Niels' suggestion I wrote the map and query (see below) A column TIPO_RIGA_ID of the table IDENTIFICATORI_VALORE is nullabl

Re: Request for Unsubscription

2008-01-31 Thread C.
On Thu, 2008-01-31 at 09:10 +, BEHL, Manish, IDC wrote: > Hi, > > I hereby request you to unsubscribe me from this mailing list for the > moment. I am getting too many emails which are exhausting my > mailbox size. > Per the headers you'll find.. List-Unsubscribe:

Error setting a property: IllegalArgumentException

2008-01-07 Thread c . zecca
Hi all iBatis reports the following exception trace --- The error occurred in it/finmatica/gpj/aa/frontedb/EspressioneFabbricaImpl.xml. --- The error occurred while applying a result map. --- Check the Gpj.mapEspressioneValoriTipoRigaMulti. --- The error happened while setting a property on t

Re: Error: "There is no statement named..."

2007-12-20 Thread c . zecca
[EMAIL PROTECTED] scritti il 18/12/2007 16:54:01 > So you do or don't want namespaces? > > Larry Following your suggestions (I would suggest using namespaces. It makes things much cleaner in terms of organization. http://www.mail-archive.com/user-java@ibatis.apache.org/msg01496.html) I turne

Re: Error: "There is no statement named..."

2007-12-18 Thread c . zecca
[EMAIL PROTECTED] scritti il 18/12/2007 16:54:01 > So you do or don't want namespaces? Right question, Larry. Well, frankly I think I do not. (I realize only now that if I do not want namespaces it would be probably better to avoid to open XML Sql Map files with the even it worked everythin

Re: Error: "There is no statement named..."

2007-12-18 Thread c . zecca
[EMAIL PROTECTED] scritti il 18/12/2007 16:20:27 Sorry for some errors and typos > If > possible I would prefer enable use of namespaces and to add > namespaced ids to all XML Sql map file If possible I would prefer to avoid to use namespaces and to add namespaced ids to all XML Sql map file

Error: "There is no statement named..."

2007-12-18 Thread c . zecca
Hi all The XML sql map (see below) contains a result map called "mapDatiCampo". All XML files belong to the same namespace caled "GPJ"; namespaces, actually, are not used. Infact, the sql-map-config.xml have no setting for useSattementNamespaces and its default, as documented, is false. "mapDati

nullable enum columns: valueOf() vs getResult()

2007-06-18 Thread c . zecca
> Re: I have a TypeHandler that converts Y/N to boolean, but sometimes Y/N might be null... http://www.mail-archive.com/user-java@ibatis.apache.org/msg04323.html Hi all My issue here is a bit different I have a TypeHandler that loads some string values (a VARCHAR column with a finite set of stri

queryForMap AND TypeHandler

2007-04-13 Thread c . zecca
I need to load a Map whose value type is an Integer key type is basically a String (VARCHAR2) with some syntactic rules. It's corresponding o-o type is NomeGruppo.java. NomeGruppoTypeHandlerCallback is it's type handler that loads VARCHAR2 fields into well-formed objects of No

Re: Does iBatis use or support Generics ?

2007-03-13 Thread c . zecca
"Clinton Begin" <[EMAIL PROTECTED]> scritti il 13/03/2007 14:42:04 > How is it safer? Let's assume to read the interface for the our factory (object loader) List myFactory( ... ); List myFactory(...); Which of the two signatures provides better information? i.e. allows the compiler to perform

Re: Does iBatis use or support Generics ?

2007-03-13 Thread c . zecca
"Clinton Begin" <[EMAIL PROTECTED]> scritti il 11/03/2007 04:24:15 > Well, since Java 5 generics are kind of half baked, we don't really > need to do anything to support them. Sure, we could make it a > little more "warning friendly", but at the end of the day you'll be > no more type safe

Re: Pass a integer type of array to the stored procedure

2007-01-23 Thread c . zecca
[...] > I have a requirement wherein i have to > pass an integer type of array to the oracle stored procedure which i > am calling from ibatis. How can this be achieved. Do i need to use > typeHandler for this? Or it can be done without that? > > Please help me. Many thanks in advance. Oracle JDB

Re: Is there any way to know the exact SQL statement passed from IBATIS to Database

2006-12-14 Thread c . zecca
John Chien <[EMAIL PROTECTED]> scritti il 13/12/2006 22:13:27 > I did not user logging. > How do I use logging ? SQL logging http://www.mail-archive.com/user-java@ibatis.apache.org/msg00765.html Other related topics if you search the list with "log4j" ciao Cesare

Re: Return result as Map

2006-12-01 Thread c . zecca
The issue has been solved by using the cast to java.math.BigDecimal lResult = (Map) lSqlMapClient.queryForMap( "selectTipiOrizzontali", null, "TIPO_DATO_ID", "TIPO_TABELLA_ID" ); Using cast is always a point of discontinuity in the type cheking... ciao

Re: Return result as Map

2006-11-30 Thread c . zecca
Debasish Dutta Roy wrote http://www.mail-archive.com/user-java@ibatis.apache.org/msg04713.html > Wed, 21 Jun 2006 12:32:25 -0700 > > Map will work. > > 1. You have to mention as java.util.HashMap as has been mentioned by > Niels. Here point to be noted if you do not give a concrete class > then

Re: Single column select !

2006-11-24 Thread c . zecca
[EMAIL PROTECTED] scritti il 23/11/2006 15:17:37 > > select blah as value from sometable > Thanks, Larry. It works. The following java code exerts successfully that SQL Map List lList = null; try { lList = (List) lSqlMapClient.queryForList( "gah", null ); } catch ( SQ

Single column select

2006-11-23 Thread c . zecca
Hi all let's consider a very simple select whose purpose is to extract a column of basic type. E.g. select MY_COLUMN from MY_TABLE for a list of values such as... 24 19 20 24 30 25 ... ( a set if the distinct specification would be used) (MY_COLUMN in this case is either of INT

Re: static checking of the inline parameters

2006-11-22 Thread c . zecca
Hi Brandon A will do it soon (i.e in the next days) ciao Cesare "Brandon Goodin" <[EMAIL PROTECTED]

Re: stored function: NUMBER result, NUMBER IN parameter !

2006-11-21 Thread c . zecca
"Jeff Butler" <[EMAIL PROTECTED]> scritti il 20/11/2006 17:24:45 > NUMBER is not a valid JDBC Type (it is Oracle specific). See here > for the valid options: ohps :/ Right. [...] The corrected SQL map {#result,mode=OUT,javaType=java.lang.Integer,jdbcType=NUMERIC# = call tipo_d

RE: select list: expression values !

2006-11-17 Thread c . zecca
"Randy Layman" <[EMAIL PROTECTED]> scritti il 17/11/2006 15:39:24 > > I think your problem might be that your SQL doesn't have a > result column ELEMENTO. I believe you should change your SQL to: > select > TIPO_RIGA_ID, ELEMENTO - 1 AS ELEMENTO, NOME, TIPO_ELEMENTO_ID > from TIPI_DATO_RIGA

select list: expression values

2006-11-17 Thread c . zecca
Hi all The following SQL map and query select TIPO_RIGA_ID, ELEMENTO - 1, NOME, TIPO_ELEMENTO_ID from TIPI_DATO_RIGA where tipo_dato_id = #id:INTEGER# raises t

Re: Can I see the actual SQL that ibatis running?

2006-11-07 Thread c . zecca
Carfield Yim <[EMAIL PROTECTED]> ha scritto il 07/11/2006 07:41:37 > > Can I see the SQL that ibatis generated and log it before press to database? Section "Logging SqlMap Activity" at page 62 of the Developer guide (iBATIS-SqlMaps-2_en.pdf) gives a first explanation. You can find further refe

RE: Problems with the typeHandler property: order of declaration!

2006-10-25 Thread c . zecca
Thanks, Niels You were right. The declaration order of the properties is important. Now   comes before     ... and it works. ">"Niels Beekman" <[EMAIL PROTECTED]> "Niels Beekman" <[EMAIL PROTECTED]> 25/10/2006 12:58 Per favore, rispondere a user-java@ibatis.apache.org

Problems with the typeHandler property

2006-10-25 Thread c . zecca
Hi all I've added the following typeHandler declaration in the sql-map-config file   and it is not successfully parsed anymore. Here is the diagnistic: com.ibatis.common.exception.NestedRuntimeException: Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Caus

TypeHandlerCallback.valueOf(): exceptions

2006-10-24 Thread C . Zecca
Hi all I've just read the example about YesNoBoolTypeHandlerCallback (p. 41 of BATIS-SqlMaps-2_en.pdf, Creating custom Type Handlers)) and the API for the TypeHandlerCallback interface public java.lang.Object valueOf(java.lang.String s) Casts the string representation of a value into a type

Re: Dynamic packages (works! :)

2006-10-13 Thread C . Zecca
Hi Jeff. Thanks for the help. It works fine! :) To help any other beginner that will face the issue go dyamic spcification of a package name (or othe parts of the SQL statement to be prepared) here follow the code snippets SQL Map  { call $packageName$.get_key_2_out_basic( #outParam,javaTyp

Re: Dynamic packages

2006-10-12 Thread C . Zecca
[EMAIL PROTECTED] scritti il 12/10/2006 13:36:36 > Put the bean in the Map, call it "bean" and refer to it's properties > in the mapped statement (or parameter map) with a "bean." prefix: > "bean.someProperty". > > There are not many examples of the Java code because it's pretty much > all the s

Dynamic packages

2006-10-12 Thread C . Zecca
Hi all I have to pass at runtime the package name to access its get_key_1(), get_key_2(), ... methods The aim is to get the feneration of the { ut_Tipo_Dato.get_key_2( ? )  } { ut_Voce.get_key_2( ? )  } to retrieve data for stored package procedures such as procedure get_key_2 ( p_tipo

Re: Stored procedures (package functions) returning a row

2006-10-11 Thread C . Zecca
Jeff Your XML config code exerted by the following Java code SqlMapClient lSqlMapClient = Configurazione.getSqlMapIstanza();     ChiaveBean lChiaveBean = new ChiaveBean();        try        {         lSqlMapClient.update( "row_return_parMap", lChiaveBean );        } ... does not work. Her

Re: Stored procedures (package functions) returning a row

2006-10-10 Thread C . Zecca
[EMAIL PROTECTED] scritti il 06/10/2006 14:57:31 > It is not feasible for Oracle JDBC drivers to support calling > arguments or return values of the PL/SQL types TABLE (now known as > indexed-by tables), RESULT SET, RECORD, or BOOLEAN > http://www.oracle.com/technology/tech/java/sqlj_jdbc/htdoc

Re: Open quote error diagnostic while parsing a resultMap

2006-10-09 Thread C . Zecca
Thanks, Larry. There were some goofy indistinguishable quote characters :/ Now I get other diagnostics, but this is another story. [EMAIL PROTECTED] scritti il 06/10/2006 19:03:33 > looks like a goofy quote char to me: " instead of " > > Larry

Open quote error diagnostic while parsing a resultMap

2006-10-06 Thread C . Zecca
The following X;ML config code { ? = call ut_Foo.get_key_2 } raises the following exception Open quote is expected for attribute "id" associated with an element type "resultMap" Here below the top of the diagnostic messages. com.ibatis.common.except

Re: Stored procedures (package functions) returning a row

2006-10-06 Thread C . Zecca
[EMAIL PROTECTED] scritti il 06/10/2006 17:23:15 > I am not understanding why you are returning a database type instead > of just a number. > > Why not just return a number? > > Larry Well, this is another story and it's explanation may be long (and, substantially, OT) We have a number of stor

Re: Stored procedures (package functions) returning a row

2006-10-06 Thread C . Zecca
Hi, Larry If I use a return parameter { ? = call ut_Foo.get_key_2 } and retrieve it on the Java side        lSqlMapClient.update( "get_key_2", lHashMap ); the PreparedStatement seems to be good DEBUG [main] - {pstm-11} PreparedStatement: { ? = call ut_Fo

Re: Stored procedures (package functions) returning a row

2006-10-06 Thread C . Zecca
[EMAIL PROTECTED] scritti il 06/10/2006 16:01:09 > Sorry, I haven't been following this thread that closely, but why not > use out parameters? > > Larry Do you mean that it's possible to use the typeName attribute of the parameterMap statement? [javaType=”string”]

Re: Stored procedures (package functions) returning a row

2006-10-06 Thread C . Zecca
Cesare Zecca/Minosse scritti il 02/10/2006 14:09:38 > The function > > function get_key_2 > return Tipo_Dato.t_PK; > of the ut_Tipo_Dato package returns a row (specifically a row > composed by a single value). The Tipo_Dato.t_PK is defined as follows type t_PK is record ( tipo_dato_ID

Re: Stored procedures (package functions) returning a row

2006-10-03 Thread C . Zecca
[EMAIL PROTECTED] scritti il 03/10/2006 15:26:03 > "Jeff Butler" <[EMAIL PROTECTED]> scritti il 03/10/2006 14:59:55 > > > There are two different issues here. > > [...]   >   > > 2. Only use queryForObject if the function returns a result set.  If > > it is just returning a single va

RE: Stored procedures (package functions) returning a row

2006-10-03 Thread C . Zecca
Thanks, Christopher! I tried hard to check everything on the DB side. The ut_Tipo_dato package is in a good state (at least while it's observed via PLSQL Developer) and compiles correctly. It is run successfuly by OUnit (I've performed the test just now) I wrote, as well, a mini test harness that

Re: What is purpose of TypeHandler

2006-10-03 Thread C . Zecca
rted by Poitras Christian http://opensource.atlassian.com/confluence/oss/pages/viewpage.action?pageId=422 refers to C sharp I want now to understand how to get a unique value (it is NOT a result set) actually a row (PL/SQL record type) from a package function. http://www.mail-archive.com/user-java@ibatis.apache.org/msg06410.html Let's see...

Re: Stored procedures (package functions) returning a row

2006-10-03 Thread C . Zecca
"Jeff Butler" <[EMAIL PROTECTED]> scritti il 03/10/2006 14:59:55 > There are two different issues here. [...]     > 2. Only use queryForObject if the function returns a result set.  If > it is just returning a single value, then call it with syntax like this: >   > {? = call myFunction} >   > R

Re: Stored procedures (package functions) returning a row

2006-10-03 Thread C . Zecca
The log generated by log4j confirms that the PreparedStatement is correctly prepared DEBUG [main] - Created connection 22664464. DEBUG [main] - {conn-10} Connection DEBUG [main] - {pstm-11} PreparedStatement: {call ut_Tipo_Dato.ut_setup} DEBUG [main] - {pstm-11} Parameters: [] DEBUG [

parameters for resultMap and other XML conf statements

2006-10-02 Thread C . Zecca
Hi all There are some explanations about how to "parametrize" the SQL instructions contained by the XML config files (cf. parameters and inline paramenters , pag. 16-17 of iBATIS-SqlMaps-2.pdf) We have a resultMap defined as follows TIPO_DATO_ID"/> the column (actually the name of a recor

Stored procedures (package functions) returning a row

2006-10-02 Thread C . Zecca
The function function get_key_2 return Tipo_Dato.t_PK; of the ut_Tipo_Dato package returns a row (specifically a row composed by a single value). A very simple JavaBean class has been created ChiaveBean and the XML has been written as follows {call ut_Tipo_Dato.get_key_2} The J

Re: Stored procedures returning a single value of basic type

2006-09-29 Thread C . Zecca
[EMAIL PROTECTED] scritti il 29/09/2006 14:34:41 > Hi all. [...] > If I've understood well I should use queryForObject method to get an > "object" from the DB. Normally queryForObject is used along with resultMap > > I've realized that using resultMap is not suitable > > "The resultMap is res

Stored procedures returning a single value of basic type

2006-09-29 Thread C . Zecca
Hi all. I ask your attention about stored procedures (and functions) again. Our tables are generally encapsulated by their corresponding package that allows random access per column via the provided key. A similar design approach applies to the unit testing packages which provide some temporary

Re: Stored procedures with no parameters (and no return data)

2006-09-27 Thread C . Zecca
"Jeff Butler" <[EMAIL PROTECTED]> scritti il 27/09/2006 16:29:30 > Hi Cesare, [...] > For your issue, remove the element, then code the > procedure elements like this (no results, no parameters): >   > >   {call ut_Tipo_Dato.ut_setup} > >   > Then call it with the "update" method.  I think

Stored procedures with no parameters (and no return data)

2006-09-27 Thread C . Zecca
stion, if any). There are two related threads Problem calling stored procedure having no parameter http://www.mail-archive.com/user-cs@ibatis.apache.org/msg01069.html in the forum about C sharp and Procedures in iBatis http://www.mail-archive.com/user-java@ibatis.apache.org/msg03964.html   in this

RE: Next steps on REFCURSOR support?

2006-05-10 Thread Ross, Jonathan C.
, Mike Fagan <[EMAIL PROTECTED]> wrote: Ross, Jonathan C. wrote:>> Can one of the committers comment on whether / when / how REFCURSOR> support will appear in iBATIS?  Details at e.g.> _http://opensource.atlassian.com/confluence/oss/display/IB

Next steps on REFCURSOR support?

2006-05-08 Thread Ross, Jonathan C.
Title: Next steps on REFCURSOR support? Can one of the committers comment on whether / when / how REFCURSOR support will appear in iBATIS?  Details at e.g. http://opensource.atlassian.com/confluence/oss/display/IBATIS/Oracle+REF+CURSOR+Solutions Background: my team maintains Java dev tools

RE: Multiple deletes? [signed]

2005-12-08 Thread Michael Laccetti [c]
arry means iterating your list, that would still result in one query, but one that works and still protects against SQL injection. Niels -Original Message- From: Michael Laccetti [c] [mailto:[EMAIL PROTECTED] Sent: donderdag 8 december 2005 23:12 To: user-java@ibatis.apache.org Subject: RE: Multip

RE: Multiple deletes? [signed]

2005-12-08 Thread Michael Laccetti [c]
t will work. A better route would be to use iteration to do it. Larry On 12/8/05, Michael Laccetti [c] <[EMAIL PROTECTED]> wrote: > I have the following statement defined in iBATIS: > > > DELETE FROM ALERTS WHERE ID IN (#value#) > > I pass it a String in the form of

Multiple deletes? [signed]

2005-12-08 Thread Michael Laccetti [c]
I have the following statement defined in iBATIS: DELETE FROM ALERTS WHERE ID IN (#value#) I pass it a String in the form of 322,321,320,319,318,317,316,315,314,313. Now, when I call it, I get the following: DEBUG [08 Dec 05 11:19:26] [http-8080-Processor23] java.sql.PreparedStatement - {pst

RE: iBATIS + Geronimo [signed]

2005-11-29 Thread Michael Laccetti [c]
f trying the JNDI lookup in a plain old servlet without using iBATIS just to make sure.   Jeff Butler  On 11/28/05, Michael Laccetti [c] <[EMAIL PROTECTED]> wrote: I followed that page to the letter.  I know that it picks up the data source, because originally there was a prob

RE: iBATIS + Geronimo [signed]

2005-11-28 Thread Michael Laccetti [c]
/05, Michael Laccetti [c] <[EMAIL PROTECTED]> wrote: Yeah, I have also tried that.  I've done a whole bunch of things, including hacking apart the iBATIS source to see how it's going about getting a context.  Nothing strange, does the regular new InitialContext(), and

RE: iBATIS + Geronimo [signed]

2005-11-28 Thread Michael Laccetti [c]
  Jeff Butler  On 11/27/05, Michael Laccetti [c] <[EMAIL PROTECTED]> wrote: Has anybody used iBATIS with Geronimo?  I've managed to get Geronimoconfigured (with much help from them on IRC), but now I have a problem with loading the SqlMap.  For some reason it cannot re

iBATIS + Geronimo [signed]

2005-11-27 Thread Michael Laccetti [c]
Has anybody used iBATIS with Geronimo? I've managed to get Geronimo configured (with much help from them on IRC), but now I have a problem with loading the SqlMap. For some reason it cannot resolve the JNDI name for the data source. I keep getting: com.ibatis.common.exception.NestedRuntimeExcep

RE: Nested Lists [signed]

2005-11-17 Thread Michael Laccetti [c]
You know what? That worked perfectly. I cannot believe I missed that. Thanks a lot! Mike -Original Message- From: Zarar Siddiqi [mailto:[EMAIL PROTECTED] Sent: November 17, 2005 4:51 PM To: user-java@ibatis.apache.org Subject: Re: Nested Lists When you're calling "getGamesForChannel"

RE: Nested Lists [signed]

2005-11-17 Thread Michael Laccetti [c]
Hrm. Let me fix that, and see if the NPE goes away. Here's hoping... And yes, I'd love to not have an N+1 select, but I haven't yet understood how to do the joins sufficiently well so that all the different records are returned. Mike -Original Message- From: Zarar Siddiqi [mailto:[EMA

Nested Lists [signed]

2005-11-16 Thread Michael Laccetti [c]
I've got a bit of a tricky question. I'm trying to retrieve a list of objects from the database. That's the easy part. The hard part is that two properties in the object are also lists. So, when I call the list query, it in turn will call two sub-queries to populate the properties. I've read a

Open Connections with WAS 6.0

2005-10-27 Thread Mitchell, Steven C
Has anybody had issues with too many open connections using iBatis SIMPLE datasources and IBM WebSphere Application Server 6.0? One of my developers has an application that uses a mixture of iBatis and native JDBC connectivity. When he tests with WAS 5.1 there are only a handful of open connectio

RE: Transaction Best Practices

2005-10-03 Thread Mitchell, Steven C
mpany company)     throws IVRPasswordException {   try {     daoManager.startTransaction();     companyDao.updateCompany( company );     daoManager.commitTransaction();     } catch (Exception e) {     throw new IVRPasswordException(e);   } finally {     daoManager.endTransaction();   } } O

RE: Transaction Best Practices

2005-10-03 Thread Mitchell, Steven C
n();     } catch (Exception e) {     throw new IVRPasswordException(e);   } finally {     daoManager.endTransaction();   } } On 9/30/05, Mitchell, Steven C <[EMAIL PROTECTED]> wrote: I've used iBatis on many projects now.  My latest project has run out of Oracle connections a co

Transaction Best Practices

2005-09-30 Thread Mitchell, Steven C
I’ve used iBatis on many projects now.  My latest project has run out of Oracle connections a couple of time during testing, which has me concerned. There did not appear to be any kind of looping going on.  I found only one Controller method that called multiple methods that used the same D

RE: Logging?

2005-08-10 Thread Mitchell, Steven C
Statement=DEBUG,stdout log4j.logger.java.sql.PreparedStatement=DEBUG,stdout log4j.logger.java.sql.ResultSet=DEBUG,stdout # Console output log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%p

RE: inserting

2005-08-09 Thread Mitchell, Steven C
We cheat. In our insert method we manually get the next id from the sequence, assign that value to a property of the object being inserted, and then do the insert. -Original Message- From: Eugeny N Dzhurinsky [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 09, 2005 7:20 AM To: user-java@

FW: Content is not allowed in prolog

2005-08-09 Thread Mitchell, Steven C
e this is not the case, so it fails. Because the default encoding varies from platform to platform creating an InputStreamReader with the default encoding is always a bug waiting to happen. [1] http://svn.apache.org/viewcvs.cgi/ibatis/trunk/java/mapper/mapper2/src/c om/ibatis/common/xml/Nod

RE: loading properties from other source

2005-07-07 Thread Mitchell, Steven C
You can do something like what I've shown below. Here I am overriding the location of the SQL MAP to support multiple databases, but you could supply ID, password, etc too. private static DaoManager getDaoManager() throws IOException { Properties properties = ConfigurationManager.getP

RE: Multiple Database Best Practices

2005-07-06 Thread Mitchell, Steven C
transactionManager type="SQLMAP">     <property name="SqlMapConfigResource" value="${ibatis.mapping.config}" /> transactionManager>   -Original Message-From: Mitchell, Steven C Sent: Wednesday, July 06, 2005 7:54 AMTo: 'user-java@ibatis.apache.

RE: Multiple Database Best Practices

2005-07-06 Thread Mitchell, Steven C
gin [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 05, 2005 10:00 PMTo: user-java@ibatis.apache.orgSubject: Re: Multiple Database Best PracticesYou're right about the multiple SqlMapConfig.xml files, but you need only one dao.xml file, as DAO supports multiple datasources.Cheers,Clin

Multiple Database Best Practices

2005-07-05 Thread Mitchell, Steven C
Is there a recommended best practice for handling an application that connects to multiple databases? Is it as simple as maintaining multiple sets of dao.xml and sql-config.xml files?

RE: Post Generated Keys

2005-06-28 Thread Mitchell, Steven C
o pre-generated keys with sequence.nextval. Thanks. Steve -Original Message- From: Larry Meadors [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 2:51 PM To: user-java@ibatis.apache.org Subject: Re: Post Generated Keys Use sequence.currval instead. On 6/27/05, Mitchell, Steven C &l

Post Generated Keys

2005-06-27 Thread Mitchell, Steven C
Title: Message I'm converting an Oracle application to iBatis.  I discovered that the database is using triggers to generate ids (I was using sequence.nextval and my ids were off by one).  The documentation says iBatis supports both pre and post generated keys.  Is that true for Oracle too? 

RE: table with export and sorting

2005-06-24 Thread Mitchell, Steven C
You have to use display tag's filter if you want to use the DisplayTag export feature. You also have read their instructions on how to setup the action call, including adding a dummy action DisplayTag can call whenever the user clicks to sort a column that just returns them back to the same JSP.

RE: DaoException

2005-06-22 Thread Mitchell, Steven C
It doesn't sound like it found the DAO interface you passed to the DaoManager in your DAO.xml file. -Original Message- From: Sagar Naik [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 22, 2005 1:25 PM To: user-java@ibatis.apache.org Subject: DaoException Hello Sire, I get this exceptio

RE: Content is not allowed in prolog

2005-06-22 Thread Mitchell, Steven C
throwing this error. Brice On 6/22/05, Mitchell, Steven C <[EMAIL PROTECTED]> wrote: > We recently starting developing with iBatis (I have used it before at > other sites). It runs fine on a WebSphere 5.1 under Rational > Application Developer 6.0 on Windows XP; however, when we try to

Content is not allowed in prolog

2005-06-22 Thread Mitchell, Steven C
Title: Message We recently starting developing with iBatis (I have used it before at other sites).  It runs fine on a WebSphere 5.1 under Rational Application Developer 6.0 on Windows XP; however, when we try to deploy to WebSphere 5.1 on AIX iBatis will not load and we get the following er