Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Association Property Ordering


Level 1


I'm having trouble with unordered association properties...

Basically I get data conflicts because the order on the server does not match the client (because I may sort them on the client)

I'm using the HibernateAnnotationsAssembler... and after tracing through the code I can see the conflict is a result of the order test in the HibernateAssembler's propertiesConflict( ... ) method.

Is there any way I tell it that the association is not ordered?

In my Java class I have:

private Set<Item> mySet = new LinkedHashSet<Item>();

@OneToMany(fetch = FetchType.EAGER)

public Set<Item> getMySet() { ... }

// public setter follows...

And in my destination config:

<one-to-many property="mySet"  destination="..." />

I hope I didn't overlook something obvious... Since the propertiesConflict method checks if the property is ordered I'd imagine there's a straightforward way to set it without resorting to something ugly.  Please help!


0 Replies