From jdo-dev-return-2762-apmail-db-jdo-dev-archive=www.apache.org@db.apache.org Tue Jan 03 23:42:41 2006 Return-Path: Delivered-To: apmail-db-jdo-dev-archive@www.apache.org Received: (qmail 55565 invoked from network); 3 Jan 2006 23:42:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Jan 2006 23:42:40 -0000 Received: (qmail 41917 invoked by uid 500); 3 Jan 2006 23:42:40 -0000 Mailing-List: contact jdo-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jdo-dev@db.apache.org Delivered-To: mailing list jdo-dev@db.apache.org Received: (qmail 41906 invoked by uid 99); 3 Jan 2006 23:42:40 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2006 15:42:40 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,UNPARSEABLE_RELAY X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [192.18.98.34] (HELO brmea-mail-3.sun.com) (192.18.98.34) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2006 15:42:39 -0800 Received: from fe-amer-03.sun.com ([192.18.108.177]) by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id k03NgI3F017905 for ; Tue, 3 Jan 2006 16:42:19 -0700 (MST) Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) id <0ISJ00C01J0KJO00@mail-amer.sun.com> (original mail from Craig.Russell@Sun.COM) for jdo-dev@db.apache.org; Tue, 03 Jan 2006 16:42:18 -0700 (MST) Received: from [192.168.0.10] (c-24-6-172-77.hsd1.ca.comcast.net [24.6.172.77]) by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPSA id <0ISJ009QHJ6HNU10@mail-amer.sun.com> for jdo-dev@db.apache.org; Tue, 03 Jan 2006 16:42:18 -0700 (MST) Date: Tue, 03 Jan 2006 15:42:14 -0800 From: Craig L Russell Subject: Re: [jira] Commented: (JDO-269) Change setId methods to allow construction of Company Model classes with default constructor In-reply-to: <853052694.1136330101289.JavaMail.jira@ajax.apache.org> Sender: Craig.Russell@Sun.COM To: jdo-dev@db.apache.org Message-id: MIME-version: 1.0 X-Mailer: Apple Mail (2.746.2) Content-type: multipart/signed; protocol="application/pkcs7-signature"; boundary=Apple-Mail-324--889253587; micalg=sha1 References: <853052694.1136330101289.JavaMail.jira@ajax.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --Apple-Mail-324--889253587 Content-Type: multipart/alternative; boundary=Apple-Mail-323--889255154 --Apple-Mail-323--889255154 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Michael, Thanks for the review. On Jan 3, 2006, at 3:15 PM, Michael Bouschen (JIRA) wrote: > [ http://issues.apache.org/jira/browse/JDO-269? > page=comments#action_12361685 ] > > Michael Bouschen commented on JDO-269: > -------------------------------------- > > The patch looks good. > > One question: with the patch 0 cannot be used as valid id, because > the code interprets id=0 as undefined id. If this is an issue we > could store the value as a java.lang.Long. Then null means id is > not specified. But I'm not sure whether this is worth the effort. > Yes, I thought of these cases but in practice I don't think change is warranted. We don't use 0 as the id, and it's a lot of work to change to a nullable type. Besides, the id field is the application identity field that should never be null. Thanks, Craig > >> Change setId methods to allow construction of Company Model >> classes with default constructor >> --------------------------------------------------------------------- >> ----------------------- >> >> Key: JDO-269 >> URL: http://issues.apache.org/jira/browse/JDO-269 >> Project: JDO >> Type: Bug >> Components: tck20 >> Reporter: Craig Russell >> Assignee: Craig Russell >> Attachments: persistentinterfaces.patch >> >> In order to use PersistenceManager.newInstance with the company >> model classes, we need to enable the setXXXId methods in the root >> classes. As it is right now, Person p = pm.newInstance >> (Person.class); p.setPersonId(5) results in IllegalStateException. > > -- > This message is automatically generated by JIRA. > - > If you think it was sent incorrectly contact one of the > administrators: > http://issues.apache.org/jira/secure/Administrators.jspa > - > For more information on JIRA, see: > http://www.atlassian.com/software/jira > Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:Craig.Russell@sun.com P.S. A good JDO? O, Gasp! --Apple-Mail-323--889255154 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Hi Michael,

Thanks for the = review.

On Jan 3, 2006, = at 3:15 PM, Michael Bouschen (JIRA) wrote:


Michael = Bouschen commented on JDO-269:

The patch = looks good.

One question: with the patch 0 cannot be used as = valid id, because the code interprets id=3D0 as undefined id. If this is = an issue we could store the value as a java.lang.Long. Then null means = id is not specified. But I'm not sure whether this is worth the = effort.=A0

Yes, I = thought of these cases but in practice I don't think change is = warranted. We don't use 0 as the id, and it's a lot of work to change to = a nullable type. Besides, the id field is the application identity field = that should never be null.

Thanks,

Craig


=
Change setId methods to = allow construction of Company Model classes with default = constructor
=A0=A0 =A0 =A0 =A0 Key: = JDO-269
=A0=A0 =A0 Project: JDO
=A0 =A0 =A0 =A0 = Type: Bug
=A0 Components: tck20
=A0 =A0 = Reporter: Craig Russell
=A0 =A0 Assignee: Craig = Russell
=A0Attachments: = persistentinterfaces.patch

In order to use = PersistenceManager.newInstance with the company model classes, we need = to enable the setXXXId methods in the root classes. As it is right now, = Person p =3D pm.newInstance(Person.class); p.setPersonId(5) results in = IllegalStateException.=A0

--=A0
This = message is automatically generated by JIRA.
If you think it was sent = incorrectly contact one of the administrators:
-
For more information on = JIRA, see:

=

Craig Russell

Architect, Sun Java Enterprise System http://java.sun.com/products/jdo=

408 = 276-5638 mailto:Craig.Russell@sun.com

P.S. A = good JDO? O, Gasp!


= --Apple-Mail-323--889255154-- --Apple-Mail-324--889253587 Content-Transfer-Encoding: base64 Content-Type: application/pkcs7-signature; name=smime.p7s Content-Dis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