I do it all the time. Its transient anyway unless you actually persist
or merge it (unless your entity beans handle persistence on change
themselves).
Actually, I typically have a form data object, one of the fields being
the entity I'm creating. I usually do that so that custom values can
be handled before I set them on the entity, such as a single date
property I want split up on the form.
- Brill
On 28-Feb-09, at 1:20 PM, Stephen Swinsburg wrote:
Hi all,
I'm after your thoughts on the following method.
Suppose there is a wicket form with some fields that can map
directly to a simple Hibernate object, and hence a db table. Is it
safe to simply wrap this object in a CompoundPropertyModel and use
it as the backing model for the form?
Then in the onSubmit method, calling a method to get the object from
the form's model and saving it via Hibernate.
This does work fine, I'm just after any pitfalls that might happen
down the track. Very simple form here.
thanks.
S
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]