You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Jepse <in...@jepse.net> on 2011/02/02 11:21:04 UTC
SET Datatype
Hi,
is anybody familiar with the Mysql Datatype "Set"?
http://dev.mysql.com/tech-resources/articles/mysql-set-datatype.html
For some reason we stores Boolean values fields for flags in couple tables.
But with a huge entry size, we ran into the problem, that these flags are
not indexable. So we thought about moving to Bitmasks. This solution is 100%
indexable, but hard to use with cayenne. Does anybody knows how to select
Fields like following sql query?
SELECT * FROM set_test WHERE myset & 2;
Thanks
Philippe
--
View this message in context: http://cayenne.195.n3.nabble.com/SET-Datatype-tp2404337p2404337.html
Sent from the Cayenne - User mailing list archive at Nabble.com.
Re: SET Datatype
Posted by Andrus Adamchik <an...@objectstyle.org>.
Haven't tried it, but I think SQLTemplate should handle it.
Andrus
On Feb 2, 2011, at 5:21 AM, Jepse wrote:
>
> Hi,
>
> is anybody familiar with the Mysql Datatype "Set"?
> http://dev.mysql.com/tech-resources/articles/mysql-set-datatype.html
>
> For some reason we stores Boolean values fields for flags in couple tables.
> But with a huge entry size, we ran into the problem, that these flags are
> not indexable. So we thought about moving to Bitmasks. This solution is 100%
> indexable, but hard to use with cayenne. Does anybody knows how to select
> Fields like following sql query?
>
> SELECT * FROM set_test WHERE myset & 2;
>
>
> Thanks
> Philippe
> --
> View this message in context: http://cayenne.195.n3.nabble.com/SET-Datatype-tp2404337p2404337.html
> Sent from the Cayenne - User mailing list archive at Nabble.com.
>