ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomáš Procházka <t.procha...@centrum.cz>
Subject Re: two parametr in Mapper method
Date Mon, 05 Oct 2009 09:45:06 GMT


This would be great, booth possibilities! Its in plan do this in 3.0 release?

-------------------------- Original message --------------------------
 From: Clinton Begin <clinton.begin@gmail.com>
 Subject: two parametr in Mapper method
 Date: Monday, October 5, 2009, 4:52:08 AM
Attachments: Zpráva.html

There's no way to introspect on the parameter names. 

So your choices become:

@Select({"SELECT * FROM send LIMIT #{1}, #{2}"})
List getAllItems(int offset, int limit);


@Select({"SELECT * FROM send LIMIT #{offset}, #{limit}"})
List getAllItems(@Param("offset") int offset, @Param("limit") int limit);

Both suck. But we'll probably default to the first, and allow for the second.

------------------------ Konec původní zprávy ------------------------

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

View raw message