History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: TRAILS-129
Type: Bug Bug
Status: Reopened Reopened
Priority: Major Major
Assignee: Unassigned
Reporter: Ken in nashua
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Trails

Reference Property Descriptors need refactoring for natural TrailsPagesService operation

Created: 13/Feb/08 10:56 AM   Updated: 10/Sep/08 02:50 AM
Component/s: trails-core
Affects Version/s: 1.2.0
Fix Version/s: 1.2.2

Time Tracking:
Not Specified

File Attachments: 1. Text File trails.core.patch.txt (63 kb)
2. Text File trails.examples.roster.patch.txt (71 kb)
3. Text File trails.hibernate.patch.txt (14 kb)

Environment: XP Pro, maven-2.0.8, eclipse-3.3.1.1, jre-1.5.0_06

Patch Submitted: Yes


 Description  « Hide
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); }



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ken in nashua - 13/Feb/08 01:57 PM
Here is a runnable patch with modifications as characterized.

No stack dumps. Runs on MySQL.

Optimizations are welcome.


Ken in nashua - 15/Feb/08 07:05 AM
Attached is an update to patch.

First Draft

Optimizations are encouraged for the effort.

This one though is stopped short by TRAILS-127


Ken in nashua - 15/Feb/08 03:00 PM
UPDATE (still draft)

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


Ken in nashua - 15/Feb/08 03:02 PM
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.


Ken in nashua - 18/Mar/08 03:59 PM
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...