You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Craig Russell (JIRA)" <ji...@apache.org> on 2006/01/03 02:49:01 UTC
[jira] Created: (JDO-269) Change setId methods to allow construction of Company Model classes with default constructor
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
Assigned to: Craig Russell
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
Re: [jira] Commented: (JDO-269) Change setId methods to allow
construction of Company Model classes with default constructor
Posted by Craig L Russell <Cr...@Sun.COM>.
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!
[jira] Commented: (JDO-269) Change setId methods to allow construction of Company Model classes with default constructor
Posted by "Michael Bouschen (JIRA)" <ji...@apache.org>.
[ 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.
> 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
[jira] Updated: (JDO-269) Change setId methods to allow construction of Company Model classes with default constructor
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-269?page=all ]
Craig Russell updated JDO-269:
------------------------------
Attachment: persistentinterfaces.patch
Please review this patch.
This patch changes the setXXXId methods to throw IllegalStateException only if the id is already set.
> 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
[jira] Resolved: (JDO-269) Change setId methods to allow construction of Company Model classes with default constructor
Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/JDO-269?page=all ]
Craig Russell resolved JDO-269:
-------------------------------
Fix Version: JDO 2 beta
Resolution: Fixed
Committed revision 365778.
> 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
> Fix For: JDO 2 beta
> 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