Explain the advantages and disadvantages of detached objects.



Explain the advantages and disadvantages of detached objects...

Answer / Yatendra Kumar

Detached objects are Hibernate entities that have been detached from the session. Advantages include: 1) Flexibility as you can modify the object without affecting the database; 2) Reduced load on the database as changes are not saved immediately. Disadvantages include: 1) Changes to detached objects are not tracked, so differences between the original and modified object need to be handled manually before reattaching; 2) If you want to persist the changes, you'll have to save or update the object explicitly.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Advanced Java Interview Questions

Will it be called overriding if I do not change the parameters or return type, instead throw a different exception in the method signature.

4 Answers   HeadStrong,


What is Connection Pooling?

1 Answers   Enteg Technologies, Infosys, Polaris,


what is the use of Object Factories?

1 Answers  


Which class is the immediate superclass of the menucomponent class?

1 Answers  


Will the general public have access to the infobus apis?

1 Answers  


In howmany ways a thread can be created?

3 Answers   HCL,


whats is stored procedure,joins

1 Answers   Photon,


Which containers use a border layout as their default layout?

1 Answers  


On a computer that having single CPU, how multithreading concept can be achieved?

1 Answers   Zensar,


Why use a datasource when you can directly specify a connection details? (in a J2EE application)

2 Answers  


What you mean by COM and DCOM?

1 Answers  


what is the RMI / IIOP?

3 Answers  


Categories