Return-Path: X-Original-To: apmail-cayenne-dev-archive@www.apache.org Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F19B6103F0 for ; Wed, 13 Nov 2013 17:21:39 +0000 (UTC) Received: (qmail 65980 invoked by uid 500); 13 Nov 2013 17:21:39 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 64722 invoked by uid 500); 13 Nov 2013 17:21:32 -0000 Mailing-List: contact dev-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 dev@cayenne.apache.org Received: (qmail 64617 invoked by uid 99); 13 Nov 2013 17:21:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 17:21:19 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.220.171] (HELO mail-vc0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 17:21:14 +0000 Received: by mail-vc0-f171.google.com with SMTP id lc6so517847vcb.30 for ; Wed, 13 Nov 2013 09:20:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=66IFYcZtXHI3QAzI0vd5MPlcBaHVCReV1ycZ/IkY0Xc=; b=TK/datm4WTi2qCs8DfyDJ0VmZgt9SIFPra6mUB6Pk+9lGN0kGSm52ixOSZ4M1Yjhvn 1jDLrSO3RK5h+OvFAjtrd3NGC22fXb/dpm4YfIDv3Gndb2cYMKpm+RqMRas5RP2DI0wT e1tf34sD+ePrfymE5l++1itR03XqJCSDYrJXJ8sr2mbDM3s7M8NjZloNNPVC27DKXs4F /2HXiA/ppnYmn8QcQkAfToBjIgyx66olteJunJnTHJ2dZhDfIvQa/ZVf5yRDwp/na2NG VmjygcfuP6784KBA0lGc1I0ivFw7bfOfLoJmCm/9dOscjY551kafly/QCsFNNa/Szg3Y qqJA== X-Gm-Message-State: ALoCoQnJ/m6robCvfsXRQr+2TYrJcn8PgBD7MXBdLAi7fNBGFHdhsJAL1chSfHPyYOQkco5OJQGv X-Received: by 10.58.67.168 with SMTP id o8mr15520832vet.22.1384363252744; Wed, 13 Nov 2013 09:20:52 -0800 (PST) MIME-Version: 1.0 Received: by 10.58.165.2 with HTTP; Wed, 13 Nov 2013 09:20:32 -0800 (PST) From: Michael Gentry Date: Wed, 13 Nov 2013 12:20:32 -0500 Message-ID: Subject: To-Many Warning? To: Cayenne Developers Content-Type: multipart/alternative; boundary=047d7b33d0f4eba6fc04eb122f11 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b33d0f4eba6fc04eb122f11 Content-Type: text/plain; charset=ISO-8859-1 I just spent a couple hours debugging an issue where the model was messed up and the to-many checkbox (in the DbEntity editors) was set on both sides of a relationship and Cayenne was inserting NULLs for the FK and orphaning records. Should Cayenne Modeler give a warning when both sides are to-many (and not a flattened many-to-many)? Here is the XML for the issue (using 3.1B2, but the issue exists in 3.0.2 also): ~> cat cayenne-project.xml ~> cat datamap.map.xml Thanks, mrg --047d7b33d0f4eba6fc04eb122f11--