Alternatively build a SetWrapper that extends the Java sets interface and
intercepts calls to add(), addAll(), remove() ....

 For each of these method, the SetWrapper will generate an appropriate
UPDATE statement. This is more general purpose than just an AppendSet.

TTL is another story, it is an extra option you can add to any
insert/update query

On Fri, Nov 14, 2014 at 5:55 AM, Kevin Burton <bur...@spinn3r.com> wrote:

> I’m trying to figure out the best way to handle things like set appends
> (and other CQL extensions) in traditional OR mapping.
>
> Our OR mapper does basic setFoo() .. then save() to write the record back
> to the database.
>
> So if foo is a Sett then I can set all members.
>
> But I want to do some appends with a custom TTL on the set..
>
> this isn’t normally handled in a OR system.
>
> I was thinking of having an AppendSet so if one calls setFoo with a
> different Set implementation the OR mapper knows to perform an append.
>
> Thoughts?
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>
>
>

Reply via email to