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
BedrockMission!

Learn More

View all

Sign in to view all badges

Association Property Ordering

Avatar

Avatar
Level 1
jbolinger
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile

Avatar
Level 1
jbolinger
Level 1

Likes

0 likes

Total Posts

1 post

Correct Reply

0 solutions
View profile
jbolinger
Level 1

08-06-2009

Hi,

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!

Thanks!