>  You also have to consider what you want to do when you're using
>  versioned objects.  If you just go get the latest object from the
>  database every time, then you'll never run into the version mismatch
>  and you won't know if one user is blowing away edits done by another
>  user.  In this case, you need to keep the original object around
>  somewhere.
Or just the version,
You can easily modify Form to hold on to the version of the hibernate
object and compare that with the version of the object fresh from the
model.

Another problem with LDM is when you have a new object (not yet
persisted to the db) and you have to carry the changes across multiple
requests before you can persist it. if you attach persisted objects to
it you run the risk of lazyinit exceptions.

We hardly ever use LDM for lists of hibernate objects because of the
query overhead, instead we use an IDataProvider that will get
everything in 1 query.
For where we use one hibernate object we have or custom hibernate
model that detaches persisted objects to minimize session mem and
prevent lazyinit. Ofcourse this works best for simple read/write
operations for the more complex situations as described above we have
yet another model that tries to solve the problem of transient and
persisted objects mixed together, detaching as much as possible.

Maurice

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to