ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reub...@sonic.net
Subject Re: Namespaces for Select Attribute
Date Thu, 13 Oct 2005 19:05:50 GMT
You can do this.

Does your settings have useStatementNamespaces? E.g.

<settings enhancementEnabled="true" maxTransactions="5" maxRequests="32"
maxSessions="10" useStatementNamespaces="true"/>

Are you sure you have imported both of your sqlMaps in your config? e.g.

<sqlMap resource="com/pepsi/blah1.xml"/>
<sqlMap resource="com/pepsi/blah2.xml"/>

What error are you seeing, otherwise?



> Hey All,
>
> I was hoping that I would be able to use the namespace feature to refer to
> a
> select in another file.  Apparently this is not doable.
> Would it be hard to implement?  Would it cause potential problems with
> circular dependencies (resultmap -> select -> resultmap)?
>
> Niels
>
> In PurchaseHeader.xml:
> <sqlMap namespace="PurchaseHeader">
>       etc...
> 	<resultMap id="PurchaseHeaderAndDetails-result"
> class="PurchaseHeader" extends="PurchaseHeader-result">
> 		<result property="purchaseDetails"
> 				column="order_no"
> 				select="PurchaseDetail.getPurchaseDetail"
> 		/>
> 	</resultMap>
> 	etc...
> </sqlMap>
>
> In PurchaseDetail.xml:
> <sqlMap namespace="PurchaseDetail">
> ...<select id="getPurchaseDetail" ...></select>
> </sqlMap
>
>



Mime
View raw message