Return-Path: X-Original-To: apmail-cayenne-commits-archive@www.apache.org Delivered-To: apmail-cayenne-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 683801058A for ; Sat, 10 Jan 2015 11:08:33 +0000 (UTC) Received: (qmail 45572 invoked by uid 500); 10 Jan 2015 11:08:34 -0000 Delivered-To: apmail-cayenne-commits-archive@cayenne.apache.org Received: (qmail 45544 invoked by uid 500); 10 Jan 2015 11:08:34 -0000 Mailing-List: contact commits-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list commits@cayenne.apache.org Received: (qmail 45534 invoked by uid 99); 10 Jan 2015 11:08:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Jan 2015 11:08:34 +0000 Date: Sat, 10 Jan 2015 11:08:34 +0000 (UTC) From: "jotpe (JIRA)" To: commits@cayenne.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAY-1983) setter for toManyTarget MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAY-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] jotpe updated CAY-1983: ----------------------- Attachment: patch.txt > setter for toManyTarget > ----------------------- > > Key: CAY-1983 > URL: https://issues.apache.org/jira/browse/CAY-1983 > Project: Cayenne > Issue Type: Improvement > Components: Core Library > Affects Versions: Short term future > Reporter: jotpe > Priority: Minor > Labels: class-generation, github-import, patch > Attachments: patch.txt > > > Sadly I didn't get any feedback this time at developer mailinglist. But this shouldn't contain bug anyway. > This pull request serves a setter method for toManyTargets, which is located in the CayenneDataObject (thank Davids advice). Others and me desire such a functionality in the out-of-the-box class gernation, look at user mailinglist. > In difference to addToManyTarget and removeFromManyTarget this method takes a input Collection and an optional boolean delete parameter (default is false) for deletion > of DataObjects, which relationships were removed. > The method documentation should be more comprehensible, what the method does and what not. > The superclass.vm generates two setter methods per toMany relationship where the relationName is part of the method name. The delete ommited method sets the deletion parameter to false and calls the other method. > I don't know, if it is a the best idea to serve a deletion parameter to prevent for orphaned DataObjects. Maybe there is a better solution. > I didn't implement yet any test classes. This has still to be done. > It would be happy if you would include my code into your project! > Thanks Johannes -- This message was sent by Atlassian JIRA (v6.3.4#6332)