Re: iBatis Eclipse Plugin

2008-04-22 Thread Jacky Chan

Hi Patrick,
  I have created a plugin for IntelliJ IDEA, and the user guide is 
http://docs.google.com/Doc?id=dc73pj2h_6db54mm  I know seldom about Eclipse 
plugin development, and you can clone the features to new plugin. If you 
have any feedback or suggestion, please let me know, and add them to 
IntelliJ IDEA plugin, thanks. :)


Best regards,
Jacky

--
From: "Patrick Huy" <[EMAIL PROTECTED]>
Sent: Wednesday, April 23, 2008 12:41 AM
To: 
Subject: iBatis Eclipse Plugin


Hi,

We are three students of the University Furtwangen in Germany and we are 
working on a semester project for the company Innovations.


Innovations would like us to create an Eclipse Plugin which aids working 
with iBatis by providing Autocompletion and Linking where appropiate. We 
won't have to touch any iBatis code for this and it will only be 
semantical dependent on iBatis.


The question is: when we get something useful to work would you be 
interested in offering this plugin on the main iBatis website/as part of 
the iBatis project?


Greetings

Patrick Huy



[jira] Closed: (IBATIS-362) LRU cache broken for stored procedures

2008-04-22 Thread Clinton Begin (JIRA)

 [ 
https://issues.apache.org/jira/browse/IBATIS-362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clinton Begin closed IBATIS-362.


Resolution: Won't Fix

The reason it "worked" in 2.1.5 is that procs weren't cached at all.  In 2.2.0+ 
proc statements were cached, but there's no way to cache output parameters, as 
you're passing the object in (so we can't cache it).  We could build something 
in to mock the parameter object (e.g. keep the values in a map)and hold the out 
params, but that's nontrivial.  So for now, no, there is no way to cache output 
parameters.  You can cache regular results from a proc of course, just not the 
OUT params...

This could be a feature request, but I'm not confident that it would ever make 
it into the 2.x release... possibly in 3.0. 

Clinton


> LRU cache broken for stored procedures
> --
>
> Key: IBATIS-362
> URL: https://issues.apache.org/jira/browse/IBATIS-362
> Project: iBatis for Java
>  Issue Type: Bug
>  Components: SQL Maps
>Affects Versions: 2.2.0
> Environment: Windows 2000, JDK 1.4.2_03, JDeveloper 9.0.5.2, Spring 
> 2.0
>Reporter: Jerome Jacobsen
>
> I've upgraded my project 
> from Spring 1.2.2,  Ibatis 2.1.5
> to Spring 2.0,  Ibatis 2.2.0 (build 638)
> I have a Stored Procedure which returns one OUT parameter of type String.  
> The procedure is setup with LRU caching.  This works fine in Ibatis 2.1.5.  
> However in Ibatis 2.2.0 on the second call to the stored procedure (with the 
> same param values) it returns an empty string instead of the value it got 
> from the database.  If I disable caching this problem disappears.
> SqlMapAuthenticationDAO.java:
> . . .
>   public String authenticateUser(Long cookie_in, String procedure_name)
>   {
> HashMap criteria = new HashMap();
> criteria.put("cookie_in", cookie_in);
> criteria.put("procedure_name", procedure_name);
> criteria.put("result", "");
> getSqlMapClientTemplate().queryForObject("authenticateUserDebug", 
> criteria);
> String result = (String)criteria.get("result");
> return result;
>   }
> . . .
> Authentication.xml:
>  . . .
>   
>  javaType="java.lang.Long" mode="IN"/>
>  javaType="java.lang.String" mode="IN"/>
>  javaType="java.lang.String" mode="OUT"/>
>   
>parameterMap="authenticateUserParameters" 
> cacheModel="authentication-cache">
> {call DS_TEST.AUTH_SEC_CHECK(?, ?, ?)}
>   
> . . .
> sql-map-config-authentication.xml:
> http://www.w3.org/1999/XSL/Format";>
>lazyLoadingEnabled="false" />
>   
> 
> Logging output looks like this on first call:
> 2006-10-30 14:14:31,850 DEBUG [com.ibatis.sqlmap.engine.cache.CacheModel] - 
> 
> 2006-10-30 14:14:31,860 DEBUG [java.sql.Connection] - <{conn-100032} 
> Preparing Call: {call DS_TEST.AUTH_SEC_CHECK(?, ?, ?)}>
> 2006-10-30 14:14:32,371 DEBUG [java.sql.PreparedStatement] - <{pstm-100033} 
> Executing Statement: {call DS_TEST.AUTH_SEC_CHECK(?, ?, ?)}>
> 2006-10-30 14:14:32,371 DEBUG [java.sql.PreparedStatement] - <{pstm-100033} 
> Parameters: [12345, DASHBOARD_MAINT_WEB.LOAD_REC_ITEMS]>
> 2006-10-30 14:14:32,371 DEBUG [java.sql.PreparedStatement] - <{pstm-100033} 
> Types: [java.lang.Long, java.lang.String]>
> 2006-10-30 14:14:32,451 DEBUG [com.ibatis.sqlmap.engine.cache.CacheModel] - 
>  PROTECTED]'>
> 2006-10-30 14:14:32,461 DEBUG 
> [com.giv.dashMaintenance.dao.db.ibatis.SqlMapAuthenticationDAO] - 
> 
> Note that it is getting the result from the database above.
> And like this on subsequent calls:
> 2006-10-30 14:15:46,893 DEBUG [com.ibatis.sqlmap.engine.cache.CacheModel] - 
>  PROTECTED]'>
> 2006-10-30 14:15:46,893 DEBUG 
> [com.giv.dashMaintenance.dao.db.ibatis.SqlMapAuthenticationDAO] - 
> Note that the above call is getting an empty String from the cache!  
> Again, in SqlMaps 2.1.5 the above works correctly.
> I find the CacheModel logs interesting.  They seem to be indicating that they 
> are caching the *input* value (empty string) for the OUT parameter "result".  
> I would expect the OUTput value of "result" to be cached instead as it was in 
> SqlMaps 2.1.5.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



[jira] Commented: (IBATISNET-253) N+1 issue when using sql timestamp data type

2008-04-22 Thread David Marzo (JIRA)

[ 
https://issues.apache.org/jira/browse/IBATISNET-253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12591408#action_12591408
 ] 

David Marzo commented on IBATISNET-253:
---

The change in the file 

trunk/cs/mapper/IBatisNet.DataMapper/TypeHandlers/ByteArrayTypeHandler.cs 

from 476843 to 60914 makes that fail if you try to read a column of type byte[] 
with DBNull.Value
restore to 476843 work for this scenario.

I don't search for a Test that cover this.

> N+1 issue when using sql timestamp data type
> 
>
> Key: IBATISNET-253
> URL: https://issues.apache.org/jira/browse/IBATISNET-253
> Project: iBatis for .NET
>  Issue Type: Bug
>  Components: DataMapper
>Affects Versions: DataMapper 1.6.1
> Environment: Visual Studio 2005 
> SQL Server 2005
>Reporter: Anthony Seddon
>Assignee: Gilles Bayon
> Fix For: DataMapper 1.6.2
>
> Attachments: iBatisTest.zip
>
>
> Select N+1 produces unexpected results when using SQL timestamp data type.  
> Created tables in SQL 2005 as follows:
> Parent table with Id (int), Description (varchar) and RowVersion (timestamp) 
> fields
> Child table with Id (int), ParentId (int), Description (varchar) and 
> RowVersion (timestamp) fields
> Added 2 records to Parent table
> Added 2 records to Child table with ParentId = 1
> Created N+1 select statement joining the 2 tables as follows:
>   SELECT Parent.Id Parent_Id, Parent.RowVersion Parent_RowVersion, 
> Parent.Description Parent_Description,
>   Child.Id Child_Id, Child.RowVersion Child_RowVersion, Child.ParentId 
> Child_ParentId, Child.Description Child_Description
>   FROM Parent LEFT JOIN Child ON Parent.Id = Child.ParentId
> Running the above statement via iBatis results in 2 Parent objects returned, 
> the 2nd one having an unexpected Child
> Created a different N+1 select statement joining the 2 tables as follows:
>   SELECT Parent.Id Parent_Id, Parent.RowVersion Parent_RowVersion, 
> Parent.Description Parent_Description,
>   Child.Id Child_Id, NULL Child_RowVersion, Child.ParentId 
> Child_ParentId, Child.Description Child_Description
>   FROM Parent LEFT JOIN Child ON Parent.Id = Child.ParentId
> Running the above statement via iBatis results in 2 Parent objects returned, 
> the 2nd one having no children, as expected
> It appears that the the fact that Child_RowVersion = 0x (as when viewed in a 
> query in SQL Management Studio) iBatis creates a Child object in error.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: iBatis Eclipse Plugin

2008-04-22 Thread Larry Meadors
Yes. :-)

There is currently an IDEA plugin that you may be able to steal some
ideas from, as well as some of the ibator stuff that might be useful
in a plug-in.

Larry


On Tue, Apr 22, 2008 at 10:41 AM, Patrick Huy <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  We are three students of the University Furtwangen in Germany and we are
> working on a semester project for the company Innovations.
>
>  Innovations would like us to create an Eclipse Plugin which aids working
> with iBatis by providing Autocompletion and Linking where appropiate. We
> won't have to touch any iBatis code for this and it will only be semantical
> dependent on iBatis.
>
>  The question is: when we get something useful to work would you be
> interested in offering this plugin on the main iBatis website/as part of the
> iBatis project?
>
>  Greetings
>
>  Patrick Huy
>


iBatis Eclipse Plugin

2008-04-22 Thread Patrick Huy

Hi,

We are three students of the University Furtwangen in Germany and we are 
working on a semester project for the company Innovations.


Innovations would like us to create an Eclipse Plugin which aids working 
with iBatis by providing Autocompletion and Linking where appropiate. We 
won't have to touch any iBatis code for this and it will only be 
semantical dependent on iBatis.


The question is: when we get something useful to work would you be 
interested in offering this plugin on the main iBatis website/as part of 
the iBatis project?


Greetings

Patrick Huy