I have a database entity that refers to a collection of non-entity components.
@Entity
class A {
@CollectionOfElements
Collection<String> b = new ArrayList<String>();
}
I'm running session-per-request and I really don't want to change that.
I have a Form where b strings can be added and deleted.
The desire is to support multiple adds and deletes before a final save
for the entity A.
But each b-string add and delete is a round trip and reloading the
LDM for A wipes the changes to the b-list.
I could keep a reference to the entity, but it's been written
"never keep direct references to hibernate entities".
What are my other options? Is there a way to keep multiple adds
and deletes in the client until "save"? Should I maintain a list of
edits and combine them with the b-list on render?
Have I missed something more straightforward (other than
session-per-conversation)?
Thanks,
-troy
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]