Re: iBATIS 3 @InsertProvider (and other @*Provider) annotation question

2010-05-21 Thread Alex Sherwin
Alright.. don't waste your time, it works fine as one would expect when given proper input. Sorry about that, I'm usually more thorough before resorting to mailing lists On 5/21/2010 11:33 AM, Alex Sherwin wrote: Method is annotated with @InsertProvider, my implementation method t

Re: iBATIS 3 @InsertProvider (and other @*Provider) annotation question

2010-05-21 Thread Alex Sherwin
null This isn't the behavior one would expect, no? On 5/21/2010 11:10 AM, Jeff Butler wrote: Yes - that works. iBATIS is using OGNL to interpret the parameters, so any valid OGNL expression works. Jeff Butler On Fri, May 21, 2010 at 10:04 AM, Alex Sherwin wrote: On 5/21/2010 10:23

Re: iBATIS 3 @InsertProvider (and other @*Provider) annotation question

2010-05-21 Thread Alex Sherwin
On 5/21/2010 10:23 AM, Alex Sherwin wrote: I just want to make sure, but there is there simply no way to pass arguments to the sql provider method defined in the annotations such as @InsertProvider? It would be very beneficial to be able to do so in terms of building dynamic sql, such as an

iBATIS 3 @InsertProvider (and other @*Provider) annotation question

2010-05-21 Thread Alex Sherwin
I just want to make sure, but there is there simply no way to pass arguments to the sql provider method defined in the annotations such as @InsertProvider? It would be very beneficial to be able to do so in terms of building dynamic sql, such as an insert statements for a dynamic number of row

Where to modify IBatis 3.x to change return types

2010-03-09 Thread Alex Sherwin
We're dynamically generating some classes (javassist) and loading them at runtime, basically, they're simple extensions to POJO's with some new wrapper methods added. What I want to do (as inefficient as this may be, but I can optimize using details within our code etc) is this: Find the poi

Dynamic SQL inside Java API for iBatis 3.x?

2010-02-08 Thread Alex Sherwin
Is there a way to get the equivalent functionality of the dynamic SQL structures for XML within a Java API SQL provider? As far as I can tell there is not... I know you can still reference parameters (i.e. #{myparam, ...}), but you can't use the structures like and , correct? I'm trying to

Re: iBatis 3.x common sql fragments?

2010-02-08 Thread Alex Sherwin
Feb 8, 2010 at 8:53 AM, Jeff Butler <mailto:jeffgbut...@gmail.com>> wrote: Yes - everything's in xml for me. Jeff Butler On 2/8/10, Alex Sherwin mailto:alex.sher...@acadiasoft.com>> wrote: > Are you registering your mappers all in the configuration XML? I

Re: iBatis 3.x common sql fragments?

2010-02-08 Thread Alex Sherwin
lieve ibatis is still load order dependant - so your fragments file needs to be loaded in the configuration before the file that uses the fragments. Jeff Butler On 2/8/10, Alex Sherwin wrote: Martin Ellis wrote: On 8 February 2010 14:40, Alex Sherwin wrote: I'm trying to c

Re: iBatis 3.x common sql fragments?

2010-02-08 Thread Alex Sherwin
Martin Ellis wrote: On 8 February 2010 14:40, Alex Sherwin wrote: I'm trying to create a "common" Sql Map XML file that will contain some common fragments. In iBatis 2.x this was easy enough, the fragments were referenced by other Sql Map files by using I assumed the sam

iBatis 3.x common sql fragments?

2010-02-08 Thread Alex Sherwin
I'm trying to create a "common" Sql Map XML file that will contain some common fragments. In iBatis 2.x this was easy enough, the fragments were referenced by other Sql Map files by using refid="fully.qualified.ns.Statement"/> I assumed the same would be true for iBatis 3.x as well, but doesn'

IBatis 3 Exceptions

2009-12-03 Thread Alex Sherwin
Why does IBatis 3.0 throw IbatisException (RuntimeException) instead of checked exceptions? Is this a limitation now due to the dynamic nature of the generic typed mapped statement classes? IbatisException doesn't even seem to wrap SQLException, I see it wrapping the native exceptions from my

Can a ibatis statement create a trigger?

2009-10-28 Thread Alex Sherwin
Using MySQL 5.1.x and iBatis 2.x, We're trying to find a way to create triggers along with the schemas and tables an iBatis function creates. Currently, a stored procedure is creating a new DB and adding tables (works fine), but MySQL stored procedures cannot create triggers, so we're seeing

Re: iBATIS 3.0 Beta 1 on Maven Repository

2009-08-10 Thread Alex Sherwin
Personally, I can't stand it when projects push out a maven repo first, or only a maven repo. Not everyone uses maven, and for those of us who don't, it makes it pretty inconvenient when that's the way the project pushes out builds. Zhubin Salehi wrote: Hi, Is it possible to put iBATIS 3.0

Re: iBatis - MySQL pagination

2009-05-15 Thread Alex Sherwin
I'm not an expert, but I think the answer is that standard SQL doesn't provide this mechanism, making it's implementation database dependent. iBATIS is providing a mechanism for skip/max that will work with any DB (quite possibly inefficiently), but at least the feature is there. To be more e

Re: problem with the parameter in select clause

2009-04-27 Thread Alex Sherwin
#thresholdValue# will put '100' in the SQL that is created (note: with single quotes, making it a non-number value) I assume what you want is to use $thresholdValue$, which will explicitly insert that value from your map as: 100 (no quotes, etc) Vasantha Rapuru wrote: Hi All, Below is my

Re: Sql Map file

2009-04-21 Thread Alex Sherwin
Not sure about doing it programatically, but it's going to end up being cleartext (or close to it) somewhere... For example when you use a connection pool in an app server, the user/password ends up being plain text in your domains configuration file... I believe most people focus on securing

Re: mysql default value

2009-03-18 Thread Alex Sherwin
What I ususally do: public String getStatus() { return null == status ? "Some Default Value" : status; } Alin Popa wrote: Thanks Nicholoz, This is what I've done. And I also have a facade that will abstract for the user, the insert actions. I thought that ibatis knows how to handle this, or

Re: Can I build a SqlMapClient from multiple xml files?

2009-03-13 Thread Alex Sherwin
We write individual files with entries that encompass objects, then link them into a using the tag. In this way, you can create a very simple sqlMapConfig for your whole project that just needs to reference all the sqlMap's you want.. Alex Chew wrote: Hi all, Many of our projects were

Problem with Stored Procedure OUT/INOUT not working for a parameter that is not at root-level of the parameter

2009-02-25 Thread Alex Sherwin
I'm observing behavior such that, say: { CALL $schema$.MY_PROCEDURE( #someRootValue1,javaType=java.lang.String,jdbcType=VARCHAR,mode=INOUT, #someRootValue2,javaType=java.lang.Long,jdbcType=BIGINT,mode=INOUT, #someObj.someSubValue1,javaType=java.lang.Long,jdbcType=BIGINT,

Problem with Map -> Object -> List object inspection in SqlMaps

2009-02-10 Thread Alex Sherwin
When I pass a Map Object as a parameter to a query, I have a custom Object that contains lists on it. My Object is keyed as "param" in the map, and the lists are "whereList", "orderByList" etc. The syntax should look like this: $param.whereList[].conjunction$ etc, however this does not work.