Trails

Reference Property Descriptors need refactoring for natural TrailsPagesService operation

Details

  • Type: Bug Bug
  • Status: Reopened Reopened
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.2.0
  • Fix Version/s: 1.2.2
  • Component/s: trails-core
  • Labels:
    None
  • Environment:
    XP Pro, maven-2.0.8, eclipse-3.3.1.1, jre-1.5.0_06
  • Patch Submitted:
    Yes
  • Number of attachments :
    3

Description

Reference Property Descriptors need refactoring for natural TrailsPagesService operation.

This assumes OneToOne belongs to the family of associations [ ManyToOne, OneToMany, ManyToMany ] for their respective editors and variations of editors.

Currently only partial set of descriptors support inverse. But the argument can be made that ALL of these descriptors should be part of core instead of extension AND they should support inverse by virtue of the natural fact they they are references to other objects via property.

  • ObjectReferenceDescriptor (imlement inverse)
  • OwningObjectReferenceDescriptor (consider moving to core out of extension)
  • CollectionDescriptor

These 3 descriptors should be modeled such that they operate a shared interface whereby they can implement inverse. Such an interface would be used by the TrailsPagesService in the activateTrialsPage method.

In the end all references will implement inverse naturally and TrailsPagesService will be able to articulate all of these descriptors so all editors will function. Currently AssociationMgt editor which implements a HardOneToOne association (as opposed to pre-configured, soft set of associations specifically AssociationSelect) does not work.

here is a proposal

package org.trails.descriptor;

public interface IReferenceSupport extends Cloneable { public String getInverseProperty(); public void setInverseProperty(String inverseProperty); }

  1. trails.core.patch.txt
    18/Mar/08 3:59 PM
    63 kB
    Ken in nashua
  2. trails.examples.roster.patch.txt
    18/Mar/08 3:59 PM
    71 kB
    Ken in nashua
  3. trails.hibernate.patch.txt
    18/Mar/08 3:59 PM
    14 kB
    Ken in nashua

Activity

Hide
Ken in nashua added a comment -

Here is a runnable patch with modifications as characterized.

No stack dumps. Runs on MySQL.

Optimizations are welcome.

Show
Ken in nashua added a comment - Here is a runnable patch with modifications as characterized. No stack dumps. Runs on MySQL. Optimizations are welcome.
Hide
Ken in nashua added a comment -

Attached is an update to patch.

First Draft

Optimizations are encouraged for the effort.

This one though is stopped short by TRAILS-127

Show
Ken in nashua added a comment - Attached is an update to patch. First Draft Optimizations are encouraged for the effort. This one though is stopped short by TRAILS-127
Hide
Ken in nashua added a comment -

UPDATE (still draft)

TRAILS-127 continues to present barrier when POJO utilizing inheritence gets encountered.

Show
Ken in nashua added a comment - UPDATE (still draft) TRAILS-127 continues to present barrier when POJO utilizing inheritence gets encountered.
Hide
Ken in nashua added a comment -

UPDATE ( still draft, but more complete )

This version has the actual association logic to populate the inverse of all ReferenceDescriptors during bootstrap.

TRAILS-127 remains barrier for POJOs that utilize inheritence.

Show
Ken in nashua added a comment - UPDATE ( still draft, but more complete ) This version has the actual association logic to populate the inverse of all ReferenceDescriptors during bootstrap. TRAILS-127 remains barrier for POJOs that utilize inheritence.
Hide
Ken in nashua added a comment -

The patch this rationalizes not only that collections should be addressed for inverse (as the current 1.2 release is designed for) but references to single entities...

Hence... CollectionDescriptor was originally designed into the system... this patch retro-fits ObjectReferenceDescriptor into the design tooso that inverse can be implemented for that as well.

The updated patch works fine less minor bugs pending more regression testing...

Show
Ken in nashua added a comment - The patch this rationalizes not only that collections should be addressed for inverse (as the current 1.2 release is designed for) but references to single entities... Hence... CollectionDescriptor was originally designed into the system... this patch retro-fits ObjectReferenceDescriptor into the design tooso that inverse can be implemented for that as well. The updated patch works fine less minor bugs pending more regression testing...

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: