Return-Path: Delivered-To: apmail-geronimo-user-archive@www.apache.org Received: (qmail 82406 invoked from network); 5 Apr 2006 23:14:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Apr 2006 23:14:37 -0000 Received: (qmail 41357 invoked by uid 500); 5 Apr 2006 23:14:26 -0000 Delivered-To: apmail-geronimo-user-archive@geronimo.apache.org Received: (qmail 41345 invoked by uid 500); 5 Apr 2006 23:14:26 -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 41334 invoked by uid 99); 5 Apr 2006 23:14:25 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2006 16:14:25 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,MSGID_FROM_MTA_HEADER,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of dreyes4@hotmail.com designates 64.4.61.40 as permitted sender) Received: from [64.4.61.40] (HELO hotmail.com) (64.4.61.40) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2006 16:14:24 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 5 Apr 2006 16:14:03 -0700 Message-ID: Received: from 64.4.61.200 by by102fd.bay102.hotmail.msn.com with HTTP; Wed, 05 Apr 2006 23:14:02 GMT X-Originating-IP: [67.136.147.167] X-Originating-Email: [dreyes4@hotmail.com] X-Sender: dreyes4@hotmail.com From: "Dale de los Reyes" To: user@geronimo.apache.org Subject: Re: FindByPrimaryKey Date: Wed, 05 Apr 2006 16:14:02 -0700 Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-OriginalArrivalTime: 05 Apr 2006 23:14:03.0362 (UTC) FILETIME=[A111EC20:01C65906] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Olivier, In your original post, you mentioned CarPK as your primary key object. I noticed this class has only a single primary key of type String (chassis, I think it was called). Anyway, for the entity bean that uses CarPK as the primary key. If possible, you can try converting it to use type String as the primary key. So now your findByPrimaryKey method will be using type String instead of CarPK. I've gotten CMP to work in Geronimo using a simple primary key of type Integer, so I'm almost certain it should work for String. On the other hand, if your architecture requires the use of compound keys (ie. multiple columns needed to make a unique ID like firstname+lastname) in your other entity beans. You might need to use BMP, unless one of the developers give the official word on the correct solution. Granted, this may not answer your original question, but hopefully it will get you moving forward. Personally, I had a similar situation with CMP using findByPrimaryKey with a primary key class. However, I was using Derby, and I was getting an ObjectNotFoundException. Hopefully, others know how to get compound keys working with CMP. I still would like to know. Later, Dale Finally, here's some code to help illustrate. Just in case... In the home interface... public create(CarPK carPK).... public findByPrimaryKey(String key).... In the implementation... public String ejbCreate(CarPK carPK) { //set stuff from carPK here... return null; } In the ejb-jar.xml... chassis Your openejb-jar.xml should not have to change. >From: "Olivier Voutat" >Reply-To: user@geronimo.apache.org >To: user@geronimo.apache.org >Subject: Re: FindByPrimaryKey >Date: Wed, 5 Apr 2006 12:12:21 -0300 > >Or even using the PostGreSQL (the sql basic syntax isn't that diferent >neither) >See, I'm using the console of Geronimo, and when I was creating the >database >pool, I was selecting in the Database type: Other > >In the postgresql it is possible to change all the parameter so it connects >to a firebird database, but doing this it will use the postgresql syntax ? > >Or I may saying completely stupid things right now....... > >Best Regards, >Olivier Voutat > >On 4/5/06, Olivier Voutat wrote: > > > > Oh Gianny, > > > > May that be the reason why my findByPrimaryKey and getPrimaryKey are > > acting weird ? > > > > When I use the getPrimaryKey (I have ClassPK) instead of returning a > > ClassPK object, it gives me a String object. And the findByPrimaryKey > > doesn't work at all (data infomation in the end) > > > > Since the basic sql language in Firebird is the same in MS sql server, > > could I configure it using the db-syntax-factory of it ? Just changing >the > > path to the database and the driver ? > > > > Best Regards, > > Olivier Voutat