>
> But lets do things one step at a time... With this philosophy in mind, is
> it still possible to do the reflexive stuff in
> DefaultSorter.DataObjectComparator?
>
My version of commit or object ordering does not use DefaultSorter so I am
not sure how could it be done by means of this class.
In brief, the whole commit thing works as follows (insertion case):
1) Objects to insert are factorized by their belongings to ObjEntities and
entities are grouped by nodes.
2) RefIntegritySupport provides entity comparators to sort ObjEntities for
each node.
3) The sorted entity lists define the order in which lists of objects (per
entity) are picked to form and run batches over JDBC connection (per node).
This approach is different from that in the Cayenne classical commit where
all the data objects (more precisely, queries) are sorted as members of one
list (knowing that mergesort performance is of the n*log n class, one can
easily compare the effectiveness of the two approaches).
> > >requirements.
>
> I disagree. We must always assume that all relevant *Db* relationships are
> present. Otherwise Cayenne will break in many other places. *Obj*
> relationships is another story and it is up to the user to have them or
> not. But DbRelationships must be there.
>
> IMO the mapping must be the main and the only source of database *runtime*
> information. Initial reverse engineering should be the time and place to
> read DB metadata. If the database changes and the mapping is not updated,
> it is absolutely correct and acceptable behavior for Cayenne to throw an
> exception, and not trying to guess what those changes might be about.
>
> Again, having better database synchronization features in the GUI to help
> solving such problems will be a good thing, and we should look at this in
> the future, but no synchronizing in runtime... (BTW, it takes about 7-10
> min to reverse engineer the Oracle schema for one of my customers...)
I agree with you on this thing at the utmost degree if it is stated clearly
in the product spec that the metadata describing the referential constraints
must be present in the data map for Cayenne to handle the data modifications
correctly and if an additional attribute is introduced for db-relationship
to tell Cayenne whether it stands for the underlying foreign key or not.
Andriy.
This archive was generated by hypermail 2.0.0 : Sun Jan 26 2003 - 19:34:10 EST