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 yaog <ya...@gmail.com> on 2010/02/07 16:06:24 UTC

CacheKey and byte[] problem

Hi,

I have a select staement that has a Where cluase the gets a byte[].

Now, if I set the same byte[] instance I enjoy the cache.

However, if I have different instnaces for the byte[] with identical content
(i.e. Array.equals(b1,b2) returns true, but b1.equals(b2) returns false),
then I see "missed cahce".

I think this is a bug in iBatis. Maybe when the hashcode is calculated?

Please advise.
-- 
View this message in context: http://old.nabble.com/CacheKey-and-byte---problem-tp27489427p27489427.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: CacheKey and byte[] problem

Posted by yaog <ya...@gmail.com>.
Done:

https://issues.apache.org/jira/browse/IBATIS-740


-- 
View this message in context: http://old.nabble.com/CacheKey-and-byte---problem-tp27489427p27496176.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


Re: CacheKey and byte[] problem

Posted by Clinton Begin <cl...@gmail.com>.
Yes, that's likely not supported by the equals and hashcodes right now.  Can
you create a JIRA ticket for it?

Cheers,
Clinton

On Sun, Feb 7, 2010 at 8:06 AM, yaog <ya...@gmail.com> wrote:

>
> Hi,
>
> I have a select staement that has a Where cluase the gets a byte[].
>
> Now, if I set the same byte[] instance I enjoy the cache.
>
> However, if I have different instnaces for the byte[] with identical
> content
> (i.e. Array.equals(b1,b2) returns true, but b1.equals(b2) returns false),
> then I see "missed cahce".
>
> I think this is a bug in iBatis. Maybe when the hashcode is calculated?
>
> Please advise.
> --
> View this message in context:
> http://old.nabble.com/CacheKey-and-byte---problem-tp27489427p27489427.html
> Sent from the iBATIS - User - Java mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
> For additional commands, e-mail: user-java-help@ibatis.apache.org
>
>