db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig Russell <Craig.Russ...@Sun.COM>
Subject Re: Completeness test with different relationship configurations
Date Fri, 08 Jul 2005 16:53:52 GMT
Hi Michael,

Mea culpa. I did not realize that when I changed the test data of the  
company model to remove the relationships, I also removed the entire  
graph except for the company1 model. That single instance was  
persisted, and that single instance was compared.

I had meant that all of the objects in the graph would have been  
instantiated and made persistent and compared. So your concern with  
the 1-1 relationships below is just part of a bigger issue.

I think the solution is to identify the "islands" of non-connected  
object graphs and to check all of the islands in the comparison.

The list of "islands" would need to be specified as a property, as a  
file, or hard coded into subclasses of CompletenessTest.


On Jul 7, 2005, at 8:42 AM, Michael Watzek wrote:

> Hi Craig,
> currently, I'm preparing the completeness test to run with  
> different configurations as we decided in last t-conference. I  
> started with adding input XML files for the company model for  
> different relationship types:
> - companyEmbedded.xml:
> This input file adds embedded objects to input file  
> companyNoRelationships.xml.
> - company1-1Relationships.xml
> This input file adds 1-1 relationships to input file  
> companyNoRelationships.xml.
> - company1-MRelationships.xml
> This input file adds 1-M relationships to input file  
> companyNoRelationships.xml.
> - companyM-MRelationships.xml:
> This input file adds M-M relationships to input file  
> companyNoRelationships.xml.
> My understanding is that we add a new configuration for each of  
> these input files, and that we run the completeness test with each  
> of those configurations.
> Currently, the completeness test reads one root object (company1)  
> from an input file and makes that persistent. Afterwards, it starts  
> a new transaction and reads that root object from the database.  
> Finally, it compares the two objects.
> I think, we have to adapt the test case in order to make 1-1  
> relationships work: Due to the fact that company does not have a  
> 1-1 relationship, the XML reader only creates an isolated company  
> object in this case.
> I see two options to solve this:
> 1) We pass the name of a root object to the test case and add the  
> name to the configurations. Different configurations would create  
> different root objects which are appropriate for their needs.
> 2) We change the completeness test in order to create one root  
> object of each persistent model class.
> What do you think?
> Regards,
> Michael
> -- 
> -------------------------------------------------------------------
> Michael Watzek                  Tech@Spree Engineering GmbH
> mailto:mwa.tech@spree.de        Buelowstr. 66
> Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
> Fax.:  ++49/30/217 520 12       http://www.spree.de/
> -------------------------------------------------------------------

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!

View raw message