[jira] Assigned: (JDO-679) Clarify downcasts in queries
[ https://issues.apache.org/jira/browse/JDO-679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig L Russell reassigned JDO-679: --- Assignee: Craig L Russell Clarify downcasts in queries Key: JDO-679 URL: https://issues.apache.org/jira/browse/JDO-679 Project: JDO Issue Type: Improvement Components: specification Affects Versions: JDO 3 maintenance release 1 Reporter: Matthew T. Adams Assignee: Craig L Russell Labels: cast, classcastexception, downcast, filter, jdouserexception, query The specification needs clarification when it comes to downcasting within the query filter. Currently, the JDO 3.0 specification states (14.6.2): Navigation through a null-valued field, which would throw NullPointerException, is treated as if the subexpression returned false. Similarly, a failed cast operation, which would throw ClassCastException, is treated as if the subexpression returned false. Other subexpressions or other values for variables might still qualify the candidate instance for inclusion in the result set. The clarification is that if a cast will never be successful (casting Employee as Integer, for example), then an exception should be thrown (JDOUserException with an inner ClassCastException?), otherwise, the cast behaves as the specification dictates. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (JDO-679) Clarify downcasts in queries
[ https://issues.apache.org/jira/browse/JDO-679?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig L Russell updated JDO-679: Component/s: tck Clarify downcasts in queries Key: JDO-679 URL: https://issues.apache.org/jira/browse/JDO-679 Project: JDO Issue Type: Improvement Components: specification, tck Affects Versions: JDO 3 maintenance release 1 Reporter: Matthew T. Adams Assignee: Craig L Russell Labels: cast, classcastexception, downcast, filter, jdouserexception, query The specification needs clarification when it comes to downcasting within the query filter. Currently, the JDO 3.0 specification states (14.6.2): Navigation through a null-valued field, which would throw NullPointerException, is treated as if the subexpression returned false. Similarly, a failed cast operation, which would throw ClassCastException, is treated as if the subexpression returned false. Other subexpressions or other values for variables might still qualify the candidate instance for inclusion in the result set. The clarification is that if a cast will never be successful (casting Employee as Integer, for example), then an exception should be thrown (JDOUserException with an inner ClassCastException?), otherwise, the cast behaves as the specification dictates. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (JDO-678) Ability to set properties on PersistenceManager
[ https://issues.apache.org/jira/browse/JDO-678?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13005774#comment-13005774 ] Craig L Russell commented on JDO-678: - If I had it to do again, I'd probably return Map?, ? from PMF.getProperties() since what is returned should be able to be used to configure a new PMF via the JDOHelper.getPersistenceManagerFactory(Map?, ?). So returning a MapString, Object is ok with me. I don't see a use case for an Object as a key... All of the properties we want to configure have been given names. We will need to specify what to expect in the returned Map. Do we expect to have all of the existing properties represented? Do they have the javax.jdo namespace? How do we map the existing properties? For example, getCopyOnAttach. There is a definition of a string key in javax.jdo.Constants static String PROPERTY_COPY_ON_ATTACH = javax.jdo.option.CopyOnAttach; key: javax.jdo.option.CopyOnAttach value: Boolean.FALSE or value: false Is it an option, or should we use a different key? Ability to set properties on PersistenceManager --- Key: JDO-678 URL: https://issues.apache.org/jira/browse/JDO-678 Project: JDO Issue Type: Improvement Components: api, specification, tck Affects Versions: JDO 3 Reporter: Andy Jefferson Assignee: Andy Jefferson Fix For: JDO 3 maintenance release 1 Attachments: jdo-678.patch It would be desirable to be able to set properties on the PersistenceManager, so as to be able to configure/change behaviour for a PM. Currently the PM is generated with particular configuration (from the PMF) and allows specific options to be set. But what about vendor extensions ? Having a general setProperty/getProperty/getSupportedProperties would be useful, and could also encompass the existing detachAllOnCommit, IgnoreCache, etc settings. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira