RE: Including a SqlMapConfig.xml file

2005-10-11 Thread Matilda Östling
Hello, I have tried to include the xml-files using 'ENTITY', but it did not work. http://www.ibatis.com/dtd/sql-map-config-2.dtd";> [ ]> &common; I have also tried to use: ... ... But then the path to the xml-file m

Re: HashMap keys

2005-10-11 Thread Larry Meadors
Your choices are to use a bean, use a result map, or look to see if there is a way to get your driver to return the results as all lower case. Larry On 10/11/05, Неверов Дмитрий <[EMAIL PROTECTED]> wrote: > Hi, I have statement: > >resultClass="java.util.HashMap"> > > > > > As resu

HashMap keys

2005-10-11 Thread Неверов Дмитрий
Hi, I have statement: As result I get a HashMap, but all keys of it in UpperCase: NPLV, MARKA, CONC1... Can I get keys in lowercase? -- Thanks. mailto:[EMAIL PROTECTED]

Re: Does iBatis reuse BasicResultMap object when query is dynamic?

2005-10-11 Thread KwonNam Son
Thank you! It works perfectly. 2005/10/12, Larry Meadors <[EMAIL PROTECTED]>: > > > Larry > > > On 10/11/05, KwonNam Son <[EMAIL PROTECTED]> wrote: > > I think iBatis resue BasicResultMap object even though the select > > query's columns are generated dinamically. > > > > I use for SELECT. > >

Re: Does iBatis reuse BasicResultMap object when query is dynamic?

2005-10-11 Thread Larry Meadors
Larry On 10/11/05, KwonNam Son <[EMAIL PROTECTED]> wrote: > I think iBatis resue BasicResultMap object even though the select > query's columns are generated dinamically. > > I use for SELECT. > It's like the following. > > parameterClass="java.util.Map" resultClass="java.uti

Does iBatis reuse BasicResultMap object when query is dynamic?

2005-10-11 Thread KwonNam Son
I think iBatis resue BasicResultMap object even though the select query's columns are generated dinamically. I use for SELECT. It's like the following. SELECT C0, $p_mm_array[]$, TOTAL, COUNT, CODE , FLOOR(OWNER_PART) OWNER_PART, CONTRACR_GUBN

RE: Issue with transactions in Oracle 8i

2005-10-11 Thread Borrill, Christopher
Stored procedure calls from Java do not commit unless the stored procedure contains a commit statement, or you issue connection.commit() in java. Make sure auto-commit is off on the JDBC connection as this will cause exactly the behaviour you are seeing. Chris -Original Message- From: D

RE: Junit / Ibatis Configuration Problem

2005-10-11 Thread Jean-Francois Poilpret
Hi Niels, I think the following line in your XML is responsible: user_id = #userId" I'm not sure all parsers would accept a quote between 2 tags? Cheers Jean-Francois -Original Message- From: Voorhoeve, Niels {PBG} [mailto:[EMAIL PROTECTED] Sent: Wednesday, O

Re: datasource form class file

2005-10-11 Thread reubenf
If I understand you correctly, you can do something like this: class Foo extends SqlMapClientDaoSupport { public Foo(DataSource ds) { super.setDataSource(ds); ClassPathResource cpr = new ClassPathResource("com/foo/dao/ibatisSQLMapsConfig.xml"); /* spring class*/ SqlMapC

datasource form class file

2005-10-11 Thread Miren Urkijo
Hello i am using ibatis but i must to load the datasource form one class file. is this posible?   i have one classfile that returns one datasource. is posible to use this file to load the conection and datasource to the data base for ibatis? thanks

Re: chaining inserts

2005-10-11 Thread Larry Meadors
Not currently, no. Larry On 10/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Is supporting this a planned future feature? Just curious. > > Thanks > > > The only way is to iterate through subobjects on the java side of > > things and explicitly make sqlMap insert calls. > > > > Larry > >

Cache models

2005-10-11 Thread Michael Campbell
Are cache-models namespaced? That is, if I define one in a namespaced SqlMap do I need to refer to it as ...cache-model="Namespace.modelname" ? Even from within the same config file? With no logging in the cache layer it's hard to see what's going on. =\ -- I tend to view "truly flexible" by a

Re: chaining inserts

2005-10-11 Thread reubenf
Is supporting this a planned future feature? Just curious. Thanks > The only way is to iterate through subobjects on the java side of > things and explicitly make sqlMap insert calls. > > Larry > > > On 10/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Hello, >> >> Using resultMaps, I ca

RE: Junit / Ibatis Configuration Problem

2005-10-11 Thread Voorhoeve, Niels {PBG}
It seems the issue is my tag in the element. Anyone have an idea why the following is unacceptable? I have version 2.1.5. As far as I can tell it conforms. Thanks, Niels select order_no , status_code , order_date ,

Re: chaining inserts

2005-10-11 Thread Larry Meadors
The only way is to iterate through subobjects on the java side of things and explicitly make sqlMap insert calls. Larry On 10/11/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hello, > > Using resultMaps, I can load sub-objects of a particular object > automagically, using the "select" attr

chaining inserts

2005-10-11 Thread reubenf
Hello, Using resultMaps, I can load sub-objects of a particular object automagically, using the "select" attribute. E.g. Is there a converse construct for saving objects? I.e., if I were to save, can I do something like: ? Or is the best way to iterate through subobjects on the java side of

Re: Issue with transactions in Oracle 8i

2005-10-11 Thread Daniel Henrique Ferreira e Silva
Hi Vincent, That's a matter of fact: in Oracle, when a stored procedure is executed, if no exceptions are raised, Oracle automagically commits all data modified within your procedure, no matter if there is a 'commit' statement in it. I'm not an expert on transaction issues, but i think there is a

Issue with transactions in Oracle 8i

2005-10-11 Thread Vincent NICOLAS
Hi everybody, In a very complex transaction, composed with stored procedures and others requests, I can't get the right behavior in case of error. I've never had any rollback done. It seems that all the requests in the stored proc are always done, with or without reaching the daoManager.commi

Junit / Ibatis Configuration Problem

2005-10-11 Thread Voorhoeve, Niels {PBG}
Hi, I'm having trouble using junit to test my ibatis setup. I am able to run 'static void main' tests within Eclipse with no problem. However when I run the same test within Junit it fails. It seems that Ibatis has trouble parsing the configuration files when run via Junit and generates tons of

Re: Limiting the number of rows returned by iBatis

2005-10-11 Thread Larry Meadors
Yes. Look at the SqlMapClient API. Larry On 10/11/05, Prashanth Sukumaran <[EMAIL PROTECTED]> wrote: > > Hi All, > > Is there a way to limit the number of rows returned by iBatis. > > I want to solve this scenario > > Case 1) The user clicks the Order Search link and i would like to show the >

Limiting the number of rows returned by iBatis

2005-10-11 Thread Prashanth Sukumaran
Hi All,   Is there a way to limit the number of rows returned by iBatis.    I want to solve this scenario   Case 1)  The user clicks the Order Search link and i would like to show the user the top 100 orders by default even before the user enters the search criteria.  ie., instead of showing the

SOLVED: MySQL Date Conversions using resultMap

2005-10-11 Thread Fabricio M. Sanchez
Thank you very much!!! I've renamed the methods so there is no more overloading taking place and it's picking the correct one! Fabricio -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Larry Meadors Sent: 11 October 2005 15:40 To: user-java@ibatis.ap

Re: MySQL Date Conversions using resultMap

2005-10-11 Thread Jeff Butler
My best guess is that having overloaded setters breaks the introspection - this is why you're having strange behavior.  This is also an issue with Struts' form beans - overloaded setters breaks in that case too.  Best to pick one and go with it.   Jeff Butler  On 10/11/05, Fabricio M. Sanchez <[EM

Re: MySQL Date Conversions using resultMap

2005-10-11 Thread Larry Meadors
Do not name two properties with the same name using different types, this will cause problems in almost every tool that works with beans. If you want a string version, call it expiryDateString or something else. Polymorphic properties are a bad idea. Larry On 10/11/05, Fabricio M. Sanchez <[EM

FW: Keyed sub selects

2005-10-11 Thread Gareth Moorst
Before acting on this e-mail or opening any attachments you are advised to read The Caudwell Holdings group of companies' disclaimer at the end of this e-mail. === Hi, Sorry if this show up twice - I posted it last week, and haven't yet seen it

MySQL Date Conversions using resultMap

2005-10-11 Thread Fabricio M. Sanchez
Hi there, I have 2 DATE fields on a MySQL table: 'expiry_date' and 'dispatched' that are identical (apart from their names). They have a default value of NULL and can be NULL (obviously). They map to a java class that defines methods for both of them using parameters String and Date, thus: publi

Re: Dirty checking

2005-10-11 Thread Dan Bradley
I had considered having the DAO reset the entity's dirty flag, but that won't work for lazy-loaded relationships. For example a Location entity is related to a Country entity through a select query: The Country entity then is not loaded by the Location DAO or the Country DAO for that matte

MySQL Date Conversions using resultMap

2005-10-11 Thread Fabricio M. Sanchez
Hi there, I have 2 DATE fields on a MySQL table: 'expiry_date' and 'dispatched' that are identical (apart from their names). They have a default value of NULL and can be NULL (obviously). They map to a java class that defines methods for both of them using parameters String and Date, thus: publi

Re: Problem with include and selectKey

2005-10-11 Thread Larry Meadors
Sure looks that way...what release of iBATIS is this? The latest? If not, try that first. Next, (if the upgrade doesn't fix it) I would ditch the include for the insert, and put it right in the insert element (I am still trying to figure out how many different places you would actually USE that in

Re: Including a SqlMapConfig.xml file

2005-10-11 Thread Daniel Henrique Ferreira e Silva
Hi Matilda, That's because you're using a sqlMap tag to include a config file. That won't work afaik. Not sure there is a way to do that within iBATIS. But you can try xml includes. I guess they'd work fine. Hope that helped. Cheers, Daniel Silva. On 10/11/05, Matilda Östling <[EMAIL PROTECTE

Including a SqlMapConfig.xml file

2005-10-11 Thread Matilda Östling
Hi, I have a little problem. How do I include a SqlMapConfig-file into another SqlMapConfig-file. In our project we have a file called CommonSqlMapConfig.xml which we would like to include in all other more specific xml-files. I have tried I do not get an errormessage while building the projec

Re: Problem with include and selectKey

2005-10-11 Thread Olivier Ziller GMail Lists
hi, Larry Meadors a écrit : Try changing your included sql fragment to this: insert into FUN_ERR_OBJ ( numObj, codGi, numLang, codInf, typErrObj, libErrObj ) values ( #numObj:INTEGER#, #codGi:VARCHAR#, #numLang:INTEGER#, #codInf:VARCHAR#, #typErrObj:VARCHAR#, #libErrOb

Re: How to handle multiple caches?

2005-10-11 Thread Larry Meadors
Not currently, no. Larry On 10/11/05, Zsolt <[EMAIL PROTECTED]> wrote: > Hi, > > I use (SELECT,UPDATE) often table A and also B separately and also a query > where both tables are joined, thus I have three caches (just an example). > > Is it possible to define relation between caches? What is th

Re: Problem with include and selectKey

2005-10-11 Thread Larry Meadors
Try changing your included sql fragment to this: insert into FUN_ERR_OBJ ( numObj, codGi, numLang, codInf, typErrObj, libErrObj ) values ( #numObj:INTEGER#, #codGi:VARCHAR#, #numLang:INTEGER#, #codInf:VARCHAR#, #typErrObj:VARCHAR#, #libErrObj:VARCHAR# ) I think if you look

How to handle multiple caches?

2005-10-11 Thread Zsolt
Hi, I use (SELECT,UPDATE) often table A and also B separately and also a query where both tables are joined, thus I have three caches (just an example). Is it possible to define relation between caches? What is the best way to handle that? Of course I have much more tables; this is just a very s

Problem with include and selectKey

2005-10-11 Thread Olivier Ziller GMail Lists
hello, i've the following statements :         insert into FUN_ERR_OBJ values (#numErrObj:INTEGER#, #numObj:INTEGER#, #codGi:VARCHAR#, #numLang:INTEGER#,     #codInf:VARCHAR#, #typErrObj:VARCHAR#, #libErrObj:VARCHAR#)     and         parameterClass="fr.unire.portal.channels

RE: XML document output from ibatis

2005-10-11 Thread Meindert
Thanks All,   To sum it up I did the following (please comment if there is a faster/better way): -Created a select statement that returns xml:   -Create an inner class in the DAO class for the rowhandler to “stich” and control the creation of the xml Document (using dom4j):   public