You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Nick Riebeek <Ni...@gov.ab.ca> on 2006/01/31 00:28:27 UTC
Using Unary condition elements to add prepended statements without tag text
Hello, I am wondering if there is a way to get a unary condition tag to
insert prepend text without having any text in the actual unary tag.
I.E.
<select id="Address.Search" resultMap=" Address.SelectResults"
parameterMap=" Address.SearchParameterMap">
SELECT *
FROM Address
<dynamic prepend="a INNER JOIN Person p ON a.PersonID =
p.PersonID">
<isNotNull property="PersonName">
</isNotNull>
</dynamic>
I've noticed if I add some text to the isNotNull tag, then the prepended
INNER JOIN statement gets added, without text unfortunately it doesn't.
Thanks.
This communication is intended for the use of the recipient to which it is addressed, and may contain confidential, personal and or privileged information. Please contact us immediately if you are not the intended recipients of this communication, and do not copy, distribute, or take action relying on it. Any communication received in error, or subsequent reply, should be deleted or destroyed.
Re: Using Unary condition elements to add prepended statements without tag text
Posted by Ron Grabowski <ro...@yahoo.com>.
I believe Java iBATIS solves this by allowing prepend attributes on all
dynamic elements:
<isNotNull property="PersonName" prepend="a INNER JOIN Person p ON
a.PersonID = p.PersonID" />
I think that would solve your problem.
Make a feature request in JIRA:
https://issues.apache.org/jira/browse/IBATISNET
--- Nick Riebeek <Ni...@gov.ab.ca> wrote:
> Hello, I am wondering if there is a way to get a unary condition tag
> to
> insert prepend text without having any text in the actual unary tag.
>
>
>
> I.E.
>
>
>
> <select id="Address.Search" resultMap=" Address.SelectResults"
> parameterMap=" Address.SearchParameterMap">
>
> SELECT *
>
> FROM Address
>
> <dynamic prepend="a INNER JOIN Person p ON a.PersonID =
> p.PersonID">
>
> <isNotNull property="PersonName">
>
>
>
> </isNotNull>
>
> </dynamic>
>
>
>
>
>
> I've noticed if I add some text to the isNotNull tag, then the
> prepended
> INNER JOIN statement gets added, without text unfortunately it
> doesn't.
>
>
>
>
>
> Thanks.
>
> This communication is intended for the use of the recipient to which
> it is addressed, and may contain confidential, personal and or
> privileged information. Please contact us immediately if you are not
> the intended recipients of this communication, and do not copy,
> distribute, or take action relying on it. Any communication received
> in error, or subsequent reply, should be deleted or destroyed.
>
>
Re: Using Unary condition elements to add prepended statements without tag text
Posted by Ron Grabowski <ro...@yahoo.com>.
What are you trying to do exactly? Why doesn't this work:
<isNotNull property="PersonName">
a INNER JOIN Person p ON a.PersonID = p.PersonID
</isNotNull>
--- Nick Riebeek <Ni...@gov.ab.ca> wrote:
> Hello, I am wondering if there is a way to get a unary condition tag
> to
> insert prepend text without having any text in the actual unary tag.
>
>
>
> I.E.
>
>
>
> <select id="Address.Search" resultMap=" Address.SelectResults"
> parameterMap=" Address.SearchParameterMap">
>
> SELECT *
>
> FROM Address
>
> <dynamic prepend="a INNER JOIN Person p ON a.PersonID =
> p.PersonID">
>
> <isNotNull property="PersonName">
>
>
>
> </isNotNull>
>
> </dynamic>
>
>
>
>
>
> I've noticed if I add some text to the isNotNull tag, then the
> prepended
> INNER JOIN statement gets added, without text unfortunately it
> doesn't.
>
>
>
>
>
> Thanks.
>
> This communication is intended for the use of the recipient to which
> it is addressed, and may contain confidential, personal and or
> privileged information. Please contact us immediately if you are not
> the intended recipients of this communication, and do not copy,
> distribute, or take action relying on it. Any communication received
> in error, or subsequent reply, should be deleted or destroyed.
>
>