You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "H.E. Sum" <ha...@yahoo.com> on 2005/08/31 02:39:44 UTC
cacheModel configuration
Does anyone know how to reference a statement in
another mapping file for the flushOnExecute
property? I tried prepending the namespace and IBatis
can't seem to find the statement.
Thanks
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: cacheModel configuration
Posted by "H.E. Sum" <ha...@yahoo.com>.
Hi, thanks all for replying so quickly. Rearranging
the order of the mapping files helped solve the
problem. What is a good solution for doing it
bidirectionally? e.g. if I have my Article.xml specify
a flush when an update statement in Author.xml is
invoked and vice versa?
Thanks again.
- H.E.
--- Prashanth Sukumaran <pr...@yahoo.com>
wrote:
> Hi Sum,
>
> It is the order in which you define the sqlMap files
> in the sqlmap-config.xml. If you want to
> reference a statement declared in another sqlMal.xml
> file put this entry on top of the file that
> is referencing the statement.
>
> Like
>
> <sqlMap
>
resource="folder/persistence/sqlmapdao/sql/Shop.xml"/>
> <sqlMap
>
resource="folder/persistence/sqlmapdao/sql/ValueObjects.xml"/>
>
> Assume there is an insert (Transport company) in the
> shop.xml and the ValueObjects has the list of
> Transport companies cached. Have the shop.xml
> listed in sqlmap-config.xml before the
> valueobjects.xml.
> On Insert in the shop.xml you want to flush the list
> of transport companies cached in
> valueobjects.xml.
>
> Rgds
>
> Prashanth.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: cacheModel configuration
Posted by Prashanth Sukumaran <pr...@yahoo.com>.
Hi Sum,
It is the order in which you define the sqlMap files in the sqlmap-config.xml. If you want to
reference a statement declared in another sqlMal.xml file put this entry on top of the file that
is referencing the statement.
Like
<sqlMap resource="folder/persistence/sqlmapdao/sql/Shop.xml"/>
<sqlMap resource="folder/persistence/sqlmapdao/sql/ValueObjects.xml"/>
Assume there is an insert (Transport company) in the shop.xml and the ValueObjects has the list of
Transport companies cached. Have the shop.xml listed in sqlmap-config.xml before the
valueobjects.xml.
On Insert in the shop.xml you want to flush the list of transport companies cached in
valueobjects.xml.
Rgds
Prashanth.
--- Daniel Henrique Ferreira e Silva <dh...@gmail.com> wrote:
> Hi Sum,
>
> How are your config files? Have you enabled namespaces in your
> sqlmap-config.xml and declared one for each sqlmap.xml file?
>
> Can you post your config files?
>
> Cheers,
> Daniel Silva.
>
> On 8/30/05, H.E. Sum <ha...@yahoo.com> wrote:
> > Does anyone know how to reference a statement in
> > another mapping file for the flushOnExecute
> > property? I tried prepending the namespace and IBatis
> > can't seem to find the statement.
> >
> > Thanks
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: cacheModel configuration
Posted by Daniel Henrique Ferreira e Silva <dh...@gmail.com>.
Hi Sum,
How are your config files? Have you enabled namespaces in your
sqlmap-config.xml and declared one for each sqlmap.xml file?
Can you post your config files?
Cheers,
Daniel Silva.
On 8/30/05, H.E. Sum <ha...@yahoo.com> wrote:
> Does anyone know how to reference a statement in
> another mapping file for the flushOnExecute
> property? I tried prepending the namespace and IBatis
> can't seem to find the statement.
>
> Thanks
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
Re: cacheModel configuration
Posted by Ron Grabowski <ro...@yahoo.com>.
Using the namespace <dot> statement name should work:
<flushOnExecute statement="User.Insert" />
<flushOnExecute statement="User.Update" />
<flushOnExecute statement="User.Delete" />
What version of iBatis are you using?
Do you get any errors?
--- "H.E. Sum" <ha...@yahoo.com> wrote:
> Does anyone know how to reference a statement in
> another mapping file for the flushOnExecute
> property? I tried prepending the namespace and IBatis
> can't seem to find the statement.
>
> Thanks
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>