FAQ
Hi Johannes,

I'm not aware of one built into Cayenne that does this yet. I know I've
had to write similar functionality a couple times in the past, too.

mrg

On Sat, Dec 13, 2014 at 1:41 AM, Johannes wrote:

try again


-------- Weitergeleitete Nachricht --------
Betreff: a setter for addToManyTarget ?
Datum: Sat, 13 Dec 2014 07:36:55 +0100
Von: Johannes <jotpe.osm@gmail.com>
An: cayenne >> user@cayenne.apache.org

Hello,

my object model has 2 toMany relationships. Cayenne Modeler generated
next to addToManyTarget(String, DataObject, boolean) methods like
addToCategories(Category) or addToTags(Tag) for me. Fine.

In some use cases it would be wonderful to call a method like
*setCategories(List<Category>)*, which would add only new and remove
only missing Categories. Existing Categories aren't touch of course.

This would save much work, because the setter is written by me multiple
times in different projects.
Or does such a method exist today?

Best regards Johannes




Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 5 | next ›
Discussion Overview
groupuser @
categoriescayenne
postedDec 13, '14 at 6:39a
activeDec 16, '14 at 2:48p
posts5
users4
websitecayenne.apache.org

People

Translate

site design / logo © 2022 Grokbase