Laurent MANNS | 5 Jul 10:58
Picon

Ibatis 3 and null values

Hello,

I'm facing a weird problem when resultType is a Map : 

<select id="test" resultType="java.util.LinkedHashMap">
  select 
    getDate() "Timestamp", 
    null      "Test"
</select>

List<LinkedHashMap<Object, Object>> lignes = session.selectList("test");

for (Iterator it = ((LinkedHashMap<Object, Object>)    
lignes.get(0)).keySet().iterator(); it.hasNext();) 
                  System.out.println(it.next());

                  		
The result is : 

   TIMESTAMP
   Timestamp
   1

Why is first column duplicated when the alias is in lowercase ? And why can't i
get the second column header when it contains null values ? 

Any help would be appreciated. 

Thx.
(Continue reading)

Poitras Christian | 5 Jul 14:23
Picon

RE: Ibatis 3 and null values

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-user <at> googlegroups.com

Christian

-----Original Message-----
From: Laurent MANNS [mailto:laurent.manns <at> gmail.com] 
Sent: Monday, July 05, 2010 4:58 AM
To: user-java <at> ibatis.apache.org
Subject: Ibatis 3 and null values

Hello,

I'm facing a weird problem when resultType is a Map : 

<select id="test" resultType="java.util.LinkedHashMap">
  select 
    getDate() "Timestamp", 
    null      "Test"
</select>

List<LinkedHashMap<Object, Object>> lignes = session.selectList("test");

for (Iterator it = ((LinkedHashMap<Object, Object>)    
lignes.get(0)).keySet().iterator(); it.hasNext();) 
                  System.out.println(it.next());

                  		
The result is : 
(Continue reading)

Panciz | 10 Jul 08:24
Picon

Ibator 1.2.2

Hi,

I built ibator 1.2.2 from sources downloaded from 
http://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/
and create the JAR file.
The problem is that when I run the tool on a configuration file,
which worked with the previous version, I get  

$ java -jar ibator-1.2.2.jar -configfile ../conf/ibatorConfig.xml 
java.net.MalformedURLException
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager
  .setupCurrentEntity(XMLEntityManager.java:650)
at com.sun.org.apache.xerces.internal.impl
  .XMLEntityManager.startEntity(XMLEntityManager.java:1315)
at com.sun.org.apache.xerces.internal.impl
.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1282)
at com.sun.org.apache.xerces.internal.impl
  .XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283)
at com.sun.org.apache.xerces.internal.impl
  .XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1193)
at com.sun.org.apache.xerces.internal.impl
  .XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1090)
at com.sun.org.apache.xerces.internal.impl
  .XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:1003)
at com.sun.org.apache.xerces.internal.impl
  .XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
at com.sun.org.apache.xerces.internal.impl
(Continue reading)

Poitras Christian | 12 Jul 14:23
Picon

RE: Ibator 1.2.2

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-user <at> googlegroups.com

Christian

-----Original Message-----
From: Panciz [mailto:dav.poletti <at> gmail.com] 
Sent: Saturday, July 10, 2010 2:25 AM
To: user-java <at> ibatis.apache.org
Subject: Ibator 1.2.2

Hi,

I built ibator 1.2.2 from sources downloaded from http://svn.apache.org/repos/asf/ibatis/java/ibator/trunk/core/
and create the JAR file.
The problem is that when I run the tool on a configuration file, which worked with the previous version, I get  

$ java -jar ibator-1.2.2.jar -configfile ../conf/ibatorConfig.xml java.net.MalformedURLException
at java.net.URL.<init>(URL.java:601) at java.net.URL.<init>(URL.java:464) at
java.net.URL.<init>(URL.java:413) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager
  .setupCurrentEntity(XMLEntityManager.java:650)
at com.sun.org.apache.xerces.internal.impl
  .XMLEntityManager.startEntity(XMLEntityManager.java:1315)
at com.sun.org.apache.xerces.internal.impl
.XMLEntityManager.startDTDEntity(XMLEntityManager.java:1282)
at com.sun.org.apache.xerces.internal.impl
  .XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:283)
at com.sun.org.apache.xerces.internal.impl
  .XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1193)
(Continue reading)

droidin.net | 19 Jul 05:06
Favicon
Gravatar

Dynamic table names in DELETE


iBatis 3 has wonderful ability in SELECT statements to provide dynamic
substitution before statement is prepared. For example this will work

<select id="foo">SELECT * FROM $db$.MY_TABLE</select>

However I can't make it work when trying to empty table

XML code:

<delete id="del" parameterType="String">DELETE FROM $db$.MY_TABLE</delete>
<!-- and I also tried -->
<delete id="del" parameterType="String">DELETE FROM $0$.MY_TABLE</delete>

Java code:

// method defined as
del(String db);
// and executed as
mapper.del("MY_DB");

I get message complaining that Database '$db$' does not exist

Anyone can suggest the solution? I'm on Teradata db and it is setup in the
way that I need provide db names in query or else I get Object not found

--

-- 
View this message in context: http://old.nabble.com/Dynamic-table-names-in-DELETE-tp29201077p29201077.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
(Continue reading)

Poitras Christian | 19 Jul 14:33
Picon

RE: Dynamic table names in DELETE

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-user <at> googlegroups.com

Christian 

-----Original Message-----
From: droidin.net [mailto:droid <at> droidin.net] 
Sent: Sunday, July 18, 2010 11:07 PM
To: user-java <at> ibatis.apache.org
Subject: Dynamic table names in DELETE

iBatis 3 has wonderful ability in SELECT statements to provide dynamic substitution before statement is
prepared. For example this will work

<select id="foo">SELECT * FROM $db$.MY_TABLE</select>

However I can't make it work when trying to empty table

XML code:

<delete id="del" parameterType="String">DELETE FROM $db$.MY_TABLE</delete>
<!-- and I also tried -->
<delete id="del" parameterType="String">DELETE FROM $0$.MY_TABLE</delete>

Java code:

// method defined as
del(String db);
// and executed as
(Continue reading)

Bruno Issenmann | 21 Jul 18:19
Picon

Re: Transaction Rollback not working with iBatis + Spring

Hi,

I'm facing the same problem. Did you solved it ?
Thanks
Larry Meadors | 21 Jul 18:43
Picon

Re: Transaction Rollback not working with iBatis + Spring

You don't need the batch, and I'm pretty sure it won't ever work with
the batch because the inserts don't happen when you call them (they
happen when you call executeBatch()) so your ids don't get set when
you expect them to.

Remove the lines related to the batch, and I think it'll work.

Larry

On Wed, Jul 21, 2010 at 10:19 AM, Bruno Issenmann
<b.issenmann <at> labsoft.fr> wrote:
> Hi,
>
> I'm facing the same problem. Did you solved it ?
> Thanks
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe <at> ibatis.apache.org
> For additional commands, e-mail: user-java-help <at> ibatis.apache.org
>
>
Bruno Issenmann | 21 Jul 19:07
Picon

Re: Transaction Rollback not working with iBatis + Spring

Thanks for ansering.

I do not use the batch.
I'm just doing two inserts then i commit. I still have an integrity contraint
violation.

RE: Transaction Rollback not working with iBatis + Spring

Sorry!! I missed the thread.
Does it give you a runtime exception? Only if the code throws a runtime
exception the transaction will be rolled back

Vinaya

-----Original Message-----
From: Bruno Issenmann [mailto:b.issenmann <at> labsoft.fr] 
Sent: Wednesday, July 21, 2010 1:07 PM
To: user-java <at> ibatis.apache.org
Subject: Re: Transaction Rollback not working with iBatis + Spring

Thanks for ansering.

I do not use the batch.
I'm just doing two inserts then i commit. I still have an integrity
contraint
violation.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe <at> ibatis.apache.org
For additional commands, e-mail: user-java-help <at> ibatis.apache.org

This electronic message is intended only for the use of the individual(s) or entity(ies) named above and
may contain information which is privileged and/or confidential.  If you are not the intended recipient,
be aware that any disclosure, copying, distribution, dissemination or use of the contents of this
message is prohibited.  If you received this message in error, please notify the sender immediately.

Gmane