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 Shane Courtrille <Sh...@huskyenergy.com> on 2008/09/16 22:29:11 UTC
Using a select from another Map file
Is it possible to have a <result property... which does a select from a different sqlMap file? I tried Namespace.statementName but no luck. Am I missing something? The only way I can see to do this would be to extend the class that the other select is in and that just seems very ugly.
Thanks,
Shane
RE: Using a select from another Map file
Posted by "Michael McCurrey (5318)" <mi...@pinggolf.com>.
One issue you might have, is I have noticed that you have an 'order of events'. If your attempting to use a statement from another map, make sure that map is loaded 'before' the calling map.
________________________________
From: Shane Courtrille [mailto:Shane.Courtrille@huskyenergy.com]
Sent: Wednesday, September 17, 2008 6:21 AM
To: user-cs@ibatis.apache.org
Subject: RE: Using a select from another Map file
Thank you very much.
From: Milivoj Milani [mailto:milivojm@gzr.hr]
Sent: Wednesday, September 17, 2008 2:23 AM
To: user-cs@ibatis.apache.org
Subject: RE: Using a select from another Map file
It is possible for sure as I am using it.
<result property="SomeProperty" column="column_name" select="NamespaceName.SelectName">
Beware, you have to use this setting in sqlmap.config:
<settings>
<setting useStatementNamespaces="true" />
</settings>
Cheers,
Milivoj
________________________________
From: Shane Courtrille [mailto:Shane.Courtrille@huskyenergy.com]
Sent: Tuesday, September 16, 2008 10:29 PM
To: user-cs@ibatis.apache.org
Subject: Using a select from another Map file
Is it possible to have a <result property... which does a select from a different sqlMap file? I tried Namespace.statementName but no luck. Am I missing something? The only way I can see to do this would be to extend the class that the other select is in and that just seems very ugly.
Thanks,
Shane
RE: Using a select from another Map file
Posted by Shane Courtrille <Sh...@huskyenergy.com>.
Thank you very much.
From: Milivoj Milani [mailto:milivojm@gzr.hr]
Sent: Wednesday, September 17, 2008 2:23 AM
To: user-cs@ibatis.apache.org
Subject: RE: Using a select from another Map file
It is possible for sure as I am using it.
<result property="SomeProperty" column="column_name" select="NamespaceName.SelectName">
Beware, you have to use this setting in sqlmap.config:
<settings>
<setting useStatementNamespaces="true" />
</settings>
Cheers,
Milivoj
________________________________
From: Shane Courtrille [mailto:Shane.Courtrille@huskyenergy.com]
Sent: Tuesday, September 16, 2008 10:29 PM
To: user-cs@ibatis.apache.org
Subject: Using a select from another Map file
Is it possible to have a <result property... which does a select from a different sqlMap file? I tried Namespace.statementName but no luck. Am I missing something? The only way I can see to do this would be to extend the class that the other select is in and that just seems very ugly.
Thanks,
Shane
RE: Using a select from another Map file
Posted by Milivoj Milani <mi...@gzr.hr>.
It is possible for sure as I am using it.
<result property="SomeProperty" column="column_name"
select="NamespaceName.SelectName">
Beware, you have to use this setting in sqlmap.config:
<settings>
<setting useStatementNamespaces="true" />
</settings>
Cheers,
Milivoj
________________________________
From: Shane Courtrille [mailto:Shane.Courtrille@huskyenergy.com]
Sent: Tuesday, September 16, 2008 10:29 PM
To: user-cs@ibatis.apache.org
Subject: Using a select from another Map file
Is it possible to have a <result property... which does a select from a
different sqlMap file? I tried Namespace.statementName but no luck. Am
I missing something? The only way I can see to do this would be to
extend the class that the other select is in and that just seems very
ugly.
Thanks,
Shane