I found a property that fixes this. <setting useStatementNamespaces="true"/> in settings in SqlMap.Config
On 9/25/05, Emmanuele De Andreis <[EMAIL PROTECTED]> wrote: > Thanks it works perfectly. > I have one more question on namespaces. > > My sqlmap1 has namespace "Name", so I first assumed that any SELECT > will be combined to have it. > eg: a select like: > <select id="Select" ... > is inedeed recognized > <select id="Name.Select" > but this thorw an error on second Namemap, that complaints the select > id is already in use. > On the other side i have added the CacheModel namespace > cacheModel="CacheModels.NameCache" and this seems to be combined > automatically. > > My cachemodel map is indeed: > <sqlMap > namespace="CacheModels" > xmlns="http://ibatis.apache.org/mapping" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > > <cacheModels> > <cacheModel id="NameCache" implementation="LRU"> > > Why on cache namespace is added and on select is not added? > Thanks > > Manu > > On 9/25/05, Ron Grabowski <[EMAIL PROTECTED]> wrote: > > To reference a cache model or a statement in another sqlMap file, turn > > on namespaces and use the full namespace of the item. > > > > The code in SVN allows a sqlMap to contain just a cacheModels node: > > > > <?xml version="1.0" encoding="UTF-8" ?> > > <sqlMap namespace="CacheModels" > > xmlns="http://ibatis.apache.org/mapping" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> > > <cacheModels> > > <cacheModel id="UserCache" implementation="MEMORY"> > > <property name="Type" value="Strong" /> > > <flushInterval hours="2" /> > > <flushOnExecute statement="User.Insert" /> > > <flushOnExecute statement="User.Update" /> > > <flushOnExecute statement="User.Delete" /> > > </cacheModel> > > </cacheModels> > > </sqlMap> > > > > The code in SVN also delays associating cacheModels with statements > > until all statements have been processed so you can include your > > cacheModel sqlMap file before or after your other sqlMap files. > > > > --- Emmanuele De Andreis <[EMAIL PROTECTED]> wrote: > > > > > HI all, > > > I have 2 sqlmaps that use LRU cache. > > > > > > Now sqlmap1 work fine. > > > Cache is used for SELECT and invalidated on INSERT, UPDATE, DELETE > > > > > > The sqlmap2 should be cached too but since uses an inner join with > > > table in sql map1 too should be invaldated when sqlmap1 is INSERT, > > > UPDATE, DELETE > > > > > > So how I can Invalidate a cache in one sqlmap from another sql map? > > > Is there a way to refer to a differente map? > > > Is there a way to actually define all caches in a separate config > > > file? > > > > > > I'm using SVN code and Vstudio 2005 > > > > > > Thanks > > > > > > Manu > > > > > > > >

