Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 62953 invoked from network); 22 Sep 2006 16:13:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Sep 2006 16:13:44 -0000 Received: (qmail 66625 invoked by uid 500); 22 Sep 2006 16:13:42 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 66405 invoked by uid 500); 22 Sep 2006 16:13:41 -0000 Mailing-List: contact user-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@geronimo.apache.org List-Id: Delivered-To: mailing list user@geronimo.apache.org Received: (qmail 66394 invoked by uid 99); 22 Sep 2006 16:13:41 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Sep 2006 09:13:41 -0700 Authentication-Results: idunn.apache.osuosl.org smtp.mail=mattias@freefarm.se; spf=permerror X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received-SPF: error (idunn.apache.osuosl.org: domain freefarm.se from 80.252.160.176 cause and error) Received: from [80.252.160.176] ([80.252.160.176:44978] helo=silver.areteinternet.se) by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP id 73/7F-06791-49B04154 for ; Fri, 22 Sep 2006 09:13:18 -0700 Received: from p2p.nu (due.p2p.nu [80.252.160.164]) by silver.areteinternet.se (8.12.8/8.12.5) with ESMTP id k8MGCgUt012366 for ; Fri, 22 Sep 2006 18:12:42 +0200 Received: from rep.freefarm.se by mailer.p2p.nu (MDaemon.PRO.v8.1.3.R) with ESMTP id md50003177904.msg for ; Fri, 22 Sep 2006 18:12:41 +0200 Message-Id: <6.2.1.2.0.20060922175631.02516a58@pop03.crystone.se> X-Mailer: QUALCOMM Windows Eudora Version 6.2.1.2 Date: Fri, 22 Sep 2006 18:12:30 +0200 To: user@geronimo.apache.org From: Mattias Malmgren Subject: CMP EJB without primary key In-Reply-To: <4513EA80.1090009@opensource.lk> References: <4513EA80.1090009@opensource.lk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Authenticated-Sender: mattiasfreefarm@mailer.p2p.nu X-Spam-Processed: mailer.p2p.nu, Fri, 22 Sep 2006 18:12:41 +0200 (not processed: spam filter disabled) X-MDRemoteIP: 81.235.10.127 X-Return-Path: mattias@freefarm.se X-MDaemon-Deliver-To: user@geronimo.apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi This is perhaps out of topic, but I have a question about CMP and EJB and there seams to be some very experiensed EJB-programmers rading this list. Reading Suns j2ee tutorial it says that an EJB must have a primary key. I wonder if it is possible to have a EBJ that only have a foreign key. Eg a weight watchers system with person and weights att diffrent dates: SQL: create table person (id int primary key, name varchar(20)) create table weight(fk_person foreign key, date varchar(8), weight numeric) Say that I have 2 entity EJBs, PersonEJB and WeightBean. The relationship is 1-n. Must the weight table also include a primary key to make CMP work, even though a primary key in this table from a SQL-point of view is unnessesary? Best regards // Mattias PS I am proud to announce that I have got my first test case of a JSP page calling an EJB to work! DS