ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Christopher <tim.christop...@gmail.com>
Subject Re: Referencing between SqlMaps
Date Mon, 07 Mar 2005 14:45:56 GMT
Hi,

Sorry for replying to my own post like this but does anyone actually
know if it is possible to reference between SqlMaps...  It's driving
me crazy having to search through all my SqlMaps to make sure I have
changed all the neccessary resultmaps everytime I update an object.

I'd love to be able to refer to a resultmap from another file to save
having to declare the same thing in mutliple files...  If this is not
currently possible, are there any plans to add it in the future?

Tim Christopher

On Thu, 3 Mar 2005 23:54:57 +0000, Tim Christopher
<tim.christopher@gmail.com> wrote:
> Hi,
> 
> Can any tell me how I can reference a statement that is stored within
> a different SqlMap?
> 
> I'm sure I can remember reading in one of the docs that this is
> possible but I've tried what I thought I can remember it saying and it
> doesn't work.
> 
> Here's a line from within my resultMap:
> <result property="anObj"   column="OBJ_ID"  select="AnObj.getById"/>
> 
> If I create a statement within the same SqlMap and change the select
> statement to "getById" (instead of "AnObj.getById") it works fine...
> But by leaving it how it is and moving the "getById" statement to the
> AnObj.xml SqlMap it throws the following Exception:
> 
> SqlMapException: There is no statement named AnObj.getById in this SqlMap.
> 
> Is what I'm trying to do actually possible?  And if so any advice
> would be greatly appreciated.
> 
> Tim Christopher
>

Mime
View raw message