Add them to a List that you keep and then when you're done, dump that list into the entity?
On Wed, Sep 9, 2009 at 10:15 PM, Troy Cauble<troycau...@gmail.com> wrote: > 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: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org