AW: Getting of composed objects

2005-09-06 Thread Farsi, Reza
Hi Nathan, I'm trying to optimize the code. For example, I wanna delegate the check, if referenced objects are NULL to the iBATIS. Reza -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 6. September 2005 21:35 An: user-java@ibatis.apache.org

Re: Vendor specific queries?

2005-09-06 Thread Prashanth Sukumaran
I understand that.  Coz., with iBatis even now we use multiple files for different databases.  I thought you were suggesting something different.    Sorry about that. Scott Zhu <[EMAIL PROTECTED]> wrote: No, the way the localization look up work in java, you have one default property file, and th

Re: Vendor specific queries?

2005-09-06 Thread Scott Zhu
No, the way the localization look up work in java, you have one default property file, and the ones with locale postfix. For example, you have staticMessages.properties and staticMesage_en_GB.properties. In the latter one, you only store the british english specific tranlations. At runtime, if the

Re: Vendor specific queries?

2005-09-06 Thread Prashanth Sukumaran
I don't know if this would be a good idea.  Consider your example of Localization resource lookup(not the directory based approach but the file based approach) for example the ApplicaitonResouces.properties in struts, are you saying it is good to have one huge file with sections like INI file for d

Re: Vendor specific queries?

2005-09-06 Thread Scott Zhu
Yes, we used some approach like this, but we have to do it on our own. I'd like to see this to be done in iBatis. Essecially, this could work like localization resource lookup in java, if the database type is oracle, it first looks in that name space (or something), if it can't find the statement t

RE: Vendor specific queries?

2005-09-06 Thread Patrick Lightbody
Good thoughts. I'd like to hear from others on this. I think iBatis should definitely try to help developers attack this problem (without trying to solve it directly -- a la Hibernate). _ Patrick Lightbody Professional Services Jive Software [EMAIL PROTECTED] www.jivesoftware.com

Re: Vendor specific queries?

2005-09-06 Thread Ron Grabowski
You could create different property files per each vendor that contain database specific things (like the select key statement, GETDATE() , etc.) and use it this way: ${SELECT_KEY} Some people use this property syntax to group database specific sql maps: A colleague of mine suggeste

Configuration info

2005-09-06 Thread Patrick Lightbody
Title: Configuration info As I mentioned in my last email, we’re trying to get WebWork and iBatis playing nice with each other. Specifically, I want to enable advanced functionality, such as intelligent reloading of the iBatis configuration whenever a mapping file changes. So far I’ve accompl

Vendor specific queries?

2005-09-06 Thread Patrick Lightbody
Title: Vendor specific queries? Hey guys – great work on iBatis. I finally spent some time on it and I must say I prefer this method of storage much more than other options out there. In fact, the next version of WebWork (which I am a developer for) will contain integration with iBatis. Now,

Re: Re: Conditional execution w/o SP

2005-09-06 Thread Larry Meadors
Can you do this with your database?: insert into table (...) values (...) where someValeu in (select something from someTable where yourCondition) Some databases (for sure PG SQL and M$ SQL) allow this. Larry On 6 Sep 2005 22:33:38 -, sreenivas <[EMAIL PROTECTED]> wrote:   Hi Larry, Tha

Re: Re: Conditional execution w/o SP

2005-09-06 Thread sreenivas
  Hi Larry, Thanks for the response. I agree with your suggestion to place the condition in DAO class, but I wanted to do this for one reason. I want to check status of a particular field using select, if there exists data for the select in that nano second, no insert should be made, insert new

Re: Conditional execution w/o SP

2005-09-06 Thread Larry Meadors
Sort of - you could do it with a statement using dynamic sql, but you will not be able to use the selectKey element. IMO this is a bad idea - do the logic in your DAO class instead of in a mapped statement. Larry On 6 Sep 2005 21:29:00 -, sreenivas <[EMAIL PROTECTED]> wrote: Hi, I have a r

Conditional execution w/o SP

2005-09-06 Thread sreenivas
Hi, I have a requirement where I need to do conditional SQL execution(insert/update). I would like to know whether or not this is possible in iBatis without writing any stored procedure. Thanks and regards, Sreenivas

Re: help me to connect ibatis to one jndi name (connection pool)

2005-09-06 Thread Jeff Butler
Two things come to mind:   1. Make sure you've configured the resource reference in your web.xml or ejb-jar.xml as appropriate.  You've configured iBATIS to use a reference, rather than the actual JNDI name (a good thing).   2. Make sure the iBATIS name matches the resource reference name.  You see

ibatis.com and DTD hosting

2005-09-06 Thread Clinton Begin
Hi everyone. The following mostly affects users of the Java version of iBATIS, but it's always nice to keep our C# friends in the loop. I have good news and bad news.  The good news is that iBATIS is very popular and in August we served up over 1,000,000 of the sql-map-2.dtd.  Most versions of iB

Re: help me to connect ibatis to one jndi name (connection pool)

2005-09-06 Thread Dionisio Egiluz Ruiz de Zárate
I run from the IDE, i haven create one war,ear.ç I have create one main class for this pourpose. whithout using the jndi, usinf the jdbc driver direcktly it conects but i cannot use my jndi. - Original Message - From: "Nathan Maves" <[EMAIL PROTECTED]> To: Sent: Tuesday, September 06

Re: help me to connect ibatis to one jndi name (connection pool)

2005-09-06 Thread Jason Vinson
Hi, We configure iBatis to use a jndi connection by default as well. To avoid including AS vendor specific jars in your build (or even having the AS running), you can use any of the mock object providers out that that allow you to create a context. Here's how we do it with spring's mock object l

Re: help me to connect ibatis to one jndi name (connection pool)

2005-09-06 Thread Nathan Maves
You have to run your application inside the container. I assume that you are creating a WAR(or EAR) file and deploying it to websphere. If not, you need to. How are you running the application? Nathan On Sep 6, 2005, at 1:58 PM, Dionisio Egiluz Ruiz de Zárate wrote: i am ttring to conf

help me to connect ibatis to one jndi name (connection pool)

2005-09-06 Thread Dionisio Egiluz Ruiz de Zárate
i am ttring to configure ibatis for using one connection pool configured into my websphere i have one jndi name (jdbc/dsDIT) and for connect i have into the ibatins conf file (SqlMapConfig.xml) this: http://www.ibatis.com/dtd/sql-map-config-2.dtd";> but when i test the conectio

Re: Getting of composed objects

2005-09-06 Thread Nathan Maves
I believe that you are doing everything correct. Are things not working or are you trying to find a better solution? Nathan On Sep 6, 2005, at 3:35 AM, Farsi, Reza wrote: Hi all, I'm testing iBATIS by the means of one simple scenario using object composition. There are two objects Inst

Re: Doing Batch Processing with IBatis from DAO Manager

2005-09-06 Thread Hycel Taylor
Hi Clinton,   I must ask of you to excuse the verbosity of this email.  But, I need to gain a better understanding about how I might go about building a custom batch API so that I may get IBatis DAO's to properly do batching.   In our last conversion, you explained the following:   "The batch contr

RE: sql to two tables

2005-09-06 Thread Cesar Villar
Con ibatis puedes hacer tódo lo que se pueda hacer con sentencias sql. Por lo tanto puedes hacer joins de tantas tablas como quieras en una única consulta. __ Renovamos el Correo Yahoo! Nuevos servicios, más seguridad http://corre

sql to two tables

2005-09-06 Thread [EMAIL PROTECTED]
is posible with ibatis using somethigs like this: SELECT DITT01CATEGORIAS.cateid, DITT01CATEGORIAS.catetitulo FROM DITT01CATEGORIAS INNER JOIN DITT02FOROSDETALLE ON DITT01CATEGORIAS.cateid = DITT02FOROSDETALLE.cateid this into two tables to make one sql how? thanks

Re: ibatis and opensource

2005-09-06 Thread Clinton Begin
iBATIS is free, open source software under the Apache License, Version 2.0. http://www.apache.org/licenses/LICENSE-2.0 Cheers, Clinton On 9/6/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: is ibatis opensource?GPL?

ibatis and opensource

2005-09-06 Thread [EMAIL PROTECTED]
is ibatis opensource? GPL?

Re: search path for mapping files

2005-09-06 Thread Clinton Begin
If you want to set the base path, you could use a property variable. BasePath="file://var/config/ibatis/" ${BasePath}/config/Customer.xml " /> Clinton On 9/6/05, Koranda Matthew James <[EMAIL PROTECTED]> wrote: The developer guide also gives this example:file:///c:/config/Customer.xml " />if

Re: How many select calls for Loading an object and referenced objects

2005-09-06 Thread Clinton Begin
Yes, you can use a join and avoid the N+1 selects problem.  I'd point you to our FAQ, but Confluence is broken right now.  :-/ There is some basic documentation in the developer guide.  Have a look there first (look for groupBy and resultMap). If you still have questions after reading the docs, t

Re: Error when i try to use ibatis with one datasource. plese help me

2005-09-06 Thread Jason Vinson
Are you trying to run this outside of the container? Jason On 9/6/05 7:03 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello > i am trying to work using ibatis. > I am working into one websphere (WSAD). > In this websphere i have create one datasouce to one sql server database. > I am t

Possible to set timeout on the connection ?

2005-09-06 Thread erlend.bjorge
Hi there! Is it possible to set some kind of timeout when useing the connection ? E.g. if you haven't got any response by 1 minute, the connection stops waiting and throw an SQLException or something ? -- We have a strange case here, doing some standard SQL wildcard searches with LIKE. Search

Error when i try to use ibatis with one datasource. plese help me

2005-09-06 Thread [EMAIL PROTECTED]
Hello i am trying to work using ibatis. I am working into one websphere (WSAD). In this websphere i have create one datasouce to one sql server database. I am try to use ibatis with this conf file (SqlMapConfig.xml) http://www.ibatis.com/dtd/sql-map-config-2.dtd";> th

Getting of composed objects

2005-09-06 Thread Farsi, Reza
Hi all, I'm testing iBATIS by the means of one simple scenario using object composition. There are two objects Instrument and Dividend. On the side of the database the tables are defined as followed: create table instrument ( id int not null auto_increment primary key, name varc

How many select calls for Loading an object and referenced objects

2005-09-06 Thread Farsi, Reza
Hi, I'm new to iBATIS. Following question: When a class is referencing an another class, how can I load the referencing class with only one select. Imagine, you have classes Fund and Transaction. Transaction has in database a filed for fund_id that references a Fund. At the Moment, I have two

RE: probe that my ibatis runs. SOS please help me

2005-09-06 Thread [EMAIL PROTECTED]
Hola tu clase, la que me has pasado, que no he podido ponerla ya que implemente una interfaz que no la tengo, me la he convertido a esto que te pongo abajo. Luego lo que pretendo es probarlo desde una clase main para lo cual hago: public class PruebaIbatis extends MyAppSqlconfig{ public s

RE: search path for mapping files

2005-09-06 Thread Koranda Matthew James
The developer guide also gives this example: if this is what you want but it doesn't seem as portable. Is this what you mean? Matt -Original Message- From: Eugeny N Dzhurinsky [mailto:[EMAIL PROTECTED] Sent: 6. september 2005 10:51 To: user-java@ibatis.apache.org Subject: Re: search

Re: search path for mapping files

2005-09-06 Thread Eugeny N Dzhurinsky
On Tue, Sep 06, 2005 at 10:42:07AM +0200, Koranda Matthew James wrote: > I bundle the files along side my class files and jar the whole thing > together. Just add the full paths in you config: > > Is that what you mean? Not really, I don't want to jar the config for now and put it in the classpat

RE: probe that my ibatis runs. SOS please help me

2005-09-06 Thread Cesar Villar
Muy buenas!!! Necesitas una clase que carge tu configuración. Te mando el código de la mía con la que realizo las transacciones. Lo único que tienes que hacer es extender a la que te mando y utilizar los métodos de la superclase, o sea, los de mi clase abstracta, desde la subclase. public class A

RE: search path for mapping files

2005-09-06 Thread Koranda Matthew James
I bundle the files along side my class files and jar the whole thing together. Just add the full paths in you config: Is that what you mean? Matt -Original Message- From: Eugeny N Dzhurinsky [mailto:[EMAIL PROTECTED] Sent: 6. september 2005 10:36 To: user-java@ibatis.apache.org Subjec

search path for mapping files

2005-09-06 Thread Eugeny N Dzhurinsky
Is there any way to specify the path where to search for the mapping files? I simply don't want to store the iBATIS files in the WEB-INF/classes for my WEB application -- Eugene N Dzhurinsky

probe that my ibatis runs. SOS please help me

2005-09-06 Thread Carlos de la Flor Egiluz
Hello i am one new user with ibatis and i cannot probe my application, i dont know how i must to made it. i have the bellow xml config files and java file. now how can i probe that it runs? how can i made one java class for running this? can you help me please? i am with this problem during 3 days

RE: Iterate over a List of complax objects

2005-09-06 Thread Koranda Matthew James
:) I stand corrected, it works fine the way you describe in your first example. It is easy to assume if there isn't a concrete example of the way you want to do something that it doesn't exist. Which brings us to documentation, I would be happy to add an example of this in the appropriate section.