Return-Path: Delivered-To: apmail-incubator-ibatis-user-java-archive@www.apache.org Received: (qmail 49698 invoked from network); 27 Apr 2005 19:37:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 27 Apr 2005 19:37:18 -0000 Received: (qmail 92956 invoked by uid 500); 27 Apr 2005 19:37:57 -0000 Delivered-To: apmail-incubator-ibatis-user-java-archive@incubator.apache.org Received: (qmail 92931 invoked by uid 500); 27 Apr 2005 19:37:57 -0000 Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Precedence: bulk Reply-To: ibatis-user-java@incubator.apache.org List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 92882 invoked by uid 99); 27 Apr 2005 19:37:56 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of gthought@gmail.com designates 64.233.170.203 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.203) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 27 Apr 2005 12:37:55 -0700 Received: by rproxy.gmail.com with SMTP id y7so255047rne for ; Wed, 27 Apr 2005 12:36:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=W4sCzuqn3nGQusvEEFLGjqGVMMD2J9feo/M5cZSsIrcj1aCmb5FF3c44+mLSNBnrMUAhY0cy9oPb2CHeEH6q43U3T/1aXkMLjxKrSyymFc1q0kpeFHORsueZFkC3VJ7CKxquwsYeEhpsD1RLJTKXLGk/QJcopEpvBLDckHxRolM= Received: by 10.38.11.30 with SMTP id 30mr1500103rnk; Wed, 27 Apr 2005 12:36:53 -0700 (PDT) Received: by 10.38.97.44 with HTTP; Wed, 27 Apr 2005 12:36:53 -0700 (PDT) Message-ID: Date: Wed, 27 Apr 2005 14:36:53 -0500 From: Gregg D Bolinger Reply-To: Gregg D Bolinger To: ibatis-user-java@incubator.apache.org Subject: Mapping Help Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I need a bit of help with setting up a mapping file or 2. I have a POJO called Filter. I use this to store options from the user as for search criteria. I have a database that relates to this filter. The problem I am having is I have 2 List properties that are part of Filter. 1 is Status and the other is Users. I have both the Status class and User class mapped with iBatis. No problem there. I have created 2 more tables. t_filter_status and t_filter_assignment. t_filter_status stores a filterId and a statusId. t_filter_assignment also holds a filterId and a userId. I need to create the Filter mapping in iBatis so that when I save the Filter object to the database, I also create records in the t_filter_status and t_filter_assingment tables. This may just be a matter of getting the SQL right but I am not 100% sure if I am even thinking about this the right way. Here is an example t_filter ------------------------------------------------------ - 1 - filtername - 04/24/05 - 04/25/05 - ------------------------------------------------------ t_filter_status ----------- - 1 - 2 - - 1 - 0 - - 1 - 1 - ---------- t_filter_assignment ----------------- - 1 - 9715 - - 1 - 8765 - ---------------- I hope this makes some sense. If you need more information just let me kno= w. Thanks Gregg