09-21-07 12:11 AM
[ https://issues.apache.org/jira/brow...action_12529260 ]
Craig Russell commented on JDO-526:
-----------------------------------
Good point, Ilan. Currently the description of the behavior is only in secti
on 15.3 which is in the ORM chapter. And the mapped-by attribute appears in
the orm xsd and dtd, by which you might infer that the feature is an ORM fea
ture not an object model fe
ature.
This is an item that should be decided by the JDO Expert Group. I think we h
ave a choice:
A) Make the relationship management behavior datastore-independent; that is,
require the behavior for all datastores. In this case, we should put the ma
naged relationship behavior description in Chapter 18 and point the Chapter
15 information at it; remov
e mapped-by attributed from the orm; and leave the tck tests alone.
B) Make the relationship management behavior specific to relational implemen
tations. In this case, we should add an optional feature (or reuse one of th
e existing javax.jdo.option.query.SQL or javax.jdo.option.GetJDBCConnection)
to indicate that the imple
mentation supports managing mapped-by relationships; and update the tck test
s to check for the option before running the tests.
I have seen people writing applications assume that relationship management
was an object model feature. I had the objective when writing the specificat
ion that it would be an object model description and required by all impleme
ntations. But the placement
in the specification might have led the reader to believe it's only an RDBMS
feature.
> Implementation fails to set other side of relationship on flush()
> -----------------------------------------------------------------
>
> Key: JDO-526
> URL: https://issues.apache.org/jira/browse/JDO-526
> Project: JDO
> Issue Type: Bug
> Components: tck2
> Affects Versions: JDO 2 maintenance release 1
> Reporter: Michelle Caisse
> Assignee: Andy Jefferson
> Fix For: JDO 2 maintenance release 1
>
>
> Some tests for managed relationships fail because after the test sets one
side of the relationship, the implementation fails to set the other side on
flush(). For example:
> testSetToNewFromMappedSide(org.apache.jdo.tck.mapping.Relationship1To1NoRe
lationships)junit.framework.AssertionFailedError:
> Assertion A15-3.1 (Relationship1To1NoRelationships) failed: testSetToNewFr
omMappedSide: Postcondition is false; other side of relationship not set on
flush
> at org.apache.jdo.tck.JDO_Test.failOnError(JDO_Test.java:1115)
> at org.apache.jdo.tck.mapping.Relationship1To1NoRelationships.testSetToNe
wFromMappedSide(Relationship1To1NoRelati
onships.java:187)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j
ava:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess
orImpl.java:25)
> at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:257)
> at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:108
)
> at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:148
)
> at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:123)
> To reproduce, run either of:
> maven -Djdo.tck.cfglist=relationshipNoRelationships.conf runtck.jdori
> maven -Djdo.tck.cfglist=relationshipAllRelationships.conf runtck.jdori
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[ Post a follow-up to this message ]
|