Ha!  That doesn't work.  XML is not parsed inside the annotation text, and it never will be. 

What we'll have to do is add a @SelectKey annotation.  For now, you'll have to select it manually, or use XML.

Feel free to add a Jira ticket for this one.


On Wed, Sep 2, 2009 at 6:04 PM, smilysep <seproyal@gmx.de> wrote:

i want to use the selectKey within a insert via java annotation.

my first try was something like this:
@Insert( { "INSERT INTO city (postcode,city)",
                       "VALUES (#{postcode},#{city})",
                       "<selectKey keyProperty=\"id\" order=\"AFTER\" resultType=\"int\">",
                               "SELECT cast(last_value as int) AS value",
                               "FROM city_id_seq",

which failed (org.postgresql.util.PSQLException: ERROR: syntax error at or
near "<")

I Read that selectKey within annotations should somehow be possible at
ibatis wiki

please give me a hint :-(
View this message in context: http://www.nabble.com/selectKey-in-annotation-tp25267744p25267744.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.

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