Register | Login
Home
Add Question
Add Article
Categories
Latest Articles
Tags
Contact Us
Search:
Search questions and share your knowledge with the world here on Questionpoint.
Home
>
Hibernate Interview Questions and Answers
>
Distinguish between transient and detached objects...
:: Categories ::
Java
Behavioral
HR
management
Sales
C#.Net
J2EE
Teaching
Struts
Marketing
Finance
Sharepoint
Accounting
JSP
General
Servlet
LINQ
Asp.net 2.0
Asp.net 1.1
Asp.net 3.5
Sql Server 2005
sql server 2008
Sql Server 2000
Microsoft CRM
Visual Studio 2008
Visual Studio 2005
Visual Studio 2003
SilverLight
Internet Information Server
J2ME
Hibernate
JBoss
J2SE
Groovy
Vb.Net
USA Immigration
Tricky
Oracle
SAP
PHP
Linux
Resume Writing
Resume Samples
Interview Tips
Other
Asp.Net 4.0
Software Sales
Call Center
BizTalk 2006
Network Support
Help Desk Support
EJB
JDBC
Spring
JSF
Ajax
Javascript
Interview Question in Hibernate
Interview Question :: Distinguish between transient and detached objects?
How does Hibernate distinguish between transient (i.e. newly instantiated) and detached objects?
by
ksk
hibernate
spring hibernate
hibernate struts
hibernate detached objects
Data Transfer Objects
hibernate DTOs
persist detached object
detach object from session
how to detach object
benefits of detached objects
detach object from hibernate
hibernate detach object from session
pros and cons of detached objects
drawbacks of detached objects
DataTransferObjects
DomainObjects
hibernate DOs
transient objects
VoteNow
Answers to "Distinguish between transient and detached objects?"
Hibernate uses the "version" property, if there is one.
If not uses the identifier value. No identifier value means a new object. This does work only for Hibernate managed surrogate keys. Does not work for natural keys and assigned (i.e. not managed by Hibernate) surrogate keys.
Write your own strategy with Interceptor.isUnsaved().
by
ksk
Loading ...
Login Here
Sign Up Here
Username
*
Password
*
Username
*
Fullname
*
Password
*
Confirmpassword
*
Email
*
Login Here
Sign Up Here
Username
*
Password
*
Username
*
Fullname
*
Password
*
Confirmpassword
*
Email
*