ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clinton Begin <clinton.be...@gmail.com>
Subject Re: selectKey in annotation
Date Thu, 03 Sep 2009 05:19:30 GMT
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.

Clinton

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

>
> Hi,
> 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",
>                        "</selectKey>"
>        })
>
> which failed (org.postgresql.util.PSQLException: ERROR: syntax error at or
> near "<")
>
> I Read that selectKey within annotations should somehow be possible at
>
> http://opensource.atlassian.com/confluence/oss/display/IBATIS/iBATIS+3.0+Whiteboard#iBATIS3.0Whiteboard-ConfigurationwithAnnotations
> 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
>
>

Mime
View raw message