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 Josh Joy <jo...@gmail.com> on 2008/06/11 18:41:47 UTC

Memcached Ibatis controller ?

Hi,

Is there a memcached ibatis controller available? A quick search on google
only turned up results for .NET

Thanks,
Josh

groupBy list always contains empty row.

Posted by Harvey Kim <ca...@fastmail.fm>.
Java class:
-----------
class SomeClassDTO
{
  blah, blah, blah attributes ...
  List someGroupByList = null;
}


Ibatis Mapping and select statement
-----------------------------------
<resultMap id="someMap" groupBy="someId" class="SomeClassDTO">
        <result property="someId" ..../>
	<result property="someGroupByList" resultMap="someGroupByList.someGroupByListMap"/>
</resultMap>

<select id="selectSomething" resultMap="someMap" >
SELECT blah blah blah attributes, joinTable.* 
FROM someTable
LEFT JOIN joinTable
ON (joinTable.someId = 123456789)
WHERE someTable.someId = 123456789


If 123456789 does NOT exist in "joinTable", shouldn't "someGroupByList"
stay null?  It always seems to have list size of 1 even if the join
entry does not exist.  Was this by design or is there something I'm not
doing wrong.  I realize the solution is to not use groupBy and populate
the list indepedently but if there is a magic flag, I'd appreciate it.

thanks,

-Harvey

-- 
http://www.fastmail.fm - Email service worth paying for. Try it for free


Re: Memcached Ibatis controller ?

Posted by Larry Meadors <la...@gmail.com>.
Not that I am aware of, but if you want to write one, it *should* be
fairly straightforward. Look at the existing sources for the other
cache implementations for a starting point.

Larry


On Wed, Jun 11, 2008 at 10:41 AM, Josh Joy <jo...@gmail.com> wrote:
> Is there a memcached ibatis controller available? A quick search on google
> only turned up results for .NET

Re: Memcached Ibatis controller ?

Posted by Christopher Lamey <cl...@localmatters.com>.
Also, you can use oscache as well with ibatis, which supports a distributed
cache.

On 6/11/08 12:04 PM, "Sundar Sankar" <fa...@gmail.com> wrote:

> I am not aware of the usage of memcache. But googling on it tells me that it
> simply stores data in memory and you hit the database only when the data
> isn't available in memory cache.
> Ibatis does provide you with a cache type called "MEMORY". I guess it does
> something similar. You may wanna read through the documentation and see if
> this is any where closer to what you need!! My Guess is you could improvise
> on this for your implementation, if it doesn't completely help your cause.
> 
> 
> 
> Warm Regards,
> 
> Sundar Sankarnarayanan
> 
> On Wed, Jun 11, 2008 at 9:41 AM, Josh Joy <jo...@gmail.com> wrote:
> 
>> Hi,
>> 
>> Is there a memcached ibatis controller available? A quick search on google
>> only turned up results for .NET
>> 
>> Thanks,
>> Josh
>> 


Re: Memcached Ibatis controller ?

Posted by Sundar Sankar <fa...@gmail.com>.
I am not aware of the usage of memcache. But googling on it tells me that it
simply stores data in memory and you hit the database only when the data
isn't available in memory cache.
Ibatis does provide you with a cache type called "MEMORY". I guess it does
something similar. You may wanna read through the documentation and see if
this is any where closer to what you need!! My Guess is you could improvise
on this for your implementation, if it doesn't completely help your cause.



Warm Regards,

Sundar Sankarnarayanan

On Wed, Jun 11, 2008 at 9:41 AM, Josh Joy <jo...@gmail.com> wrote:

> Hi,
>
> Is there a memcached ibatis controller available? A quick search on google
> only turned up results for .NET
>
> Thanks,
> Josh
>