Trails

Persistence Service incomplete, lacks coherent OneToOne support

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.2.0, 1.2.1
  • Fix Version/s: 1.2.2
  • Component/s: trails-hibernate
  • Labels:
    None
  • Environment:
    XP Pro, apache-maven-2.0.8, eclipse-3.3.1.1, jre-1.5.0_14, ognl-2.7.3-SNAPSHOT, tapestry-4.1.6-SNAPSHOT , MySQL-5.0.45
  • Number of attachments :
    5

Description

Persistence Service incomplete, lacks OneToOne support

The interface and implementation nicely supports OneToMany and ManyToOne and ManyToMany with CollectionDescriptor, etc... and proper OGNL automation of object manipulation with addExprssion/removeExpression

Currently there is none for OneToOne relationships.

It is recommended that the following methods be implemented for

public interface PersistenceService {
<T> T saveElement(String addExpression, T member, Object parent);
void removeElement(String removeExpression, Object member, Object parent);
}

Currently the code is convoluted with various kinds of incoherent save functionality on entities that are not collection oriented.

Patch pending...

  1. EditPage.java
    14/Aug/08 4:10 PM
    6 kB
    Ken in nashua
  2. HibernateEditPage.java
    14/Aug/08 4:09 PM
    3 kB
    Ken in nashua
  3. HibernatePersistenceServiceImpl.java
    14/Aug/08 4:09 PM
    19 kB
    Ken in nashua
  4. PersistenceService.java
    14/Aug/08 4:09 PM
    2 kB
    Ken in nashua
  5. Utils.java
    14/Aug/08 4:10 PM
    5 kB
    Ken in nashua

Activity

Hide
Ken in nashua added a comment -

Just some add/remove logic for peer to peer associations.

Tested works nicely.

I admire the consolidation of OGNL with the actual back end operation.

Show
Ken in nashua added a comment - Just some add/remove logic for peer to peer associations. Tested works nicely. I admire the consolidation of OGNL with the actual back end operation.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: