I guess one of the hard parts would be dealing with lazy loading of associated entities.
By default, the latest hibernate (3) uses lazy loading for all associations. This can be overridden though. So, for each entity you'd have to work out the extent of the object graph that you wish to retrieve in the data layer, and either set those association to non-lazy explicitly in the mapping files, or design the data layer code to initialise them as required.
Changes to detached objects can also involve transactional problems, with the recommended hibernate solution being to use optimistic locking through versioning attributes on the entities (these are automatically handled by hibernate, I believe).
Those are the obvious problems I can think of, pretty sure there's others.
|