जेपीए में, वहाँ किसी भी तरह से आप हाइबरनेट के saveOrUpdate behavior को दोहराने कर सकते हैं,आप जेपीए में हाइबरनेट के saveOrUpdate को दोहरा सकते हैं?
saveOrUpdate
public void saveOrUpdate(Object object)
throws HibernateException
Either save(Object) or update(Object) the given instance, depending upon resolution of the unsaved-value checks (see the manual for discussion of unsaved-value checking).
This operation cascades to associated instances if the association is mapped with cascade="save-update".
Parameters:
object - a transient or detached instance containing new or updated state
Throws:
HibernateException
See Also:
save(Object), update(Object)
जो अनिवार्य रूप से या यदि वस्तु पहले से ही है कि या तो होने की जरूरत के रूप में वस्तु अद्यतन डेटाबेस में मौजूद है और यह देखने के लिए जाँच करता है का एक नया उदाहरण बचाता है वस्तु।
जेपीए ट्रांसकेशंसलेस पढ़ना अच्छा है, लेकिन मैं वास्तव में हाइबरनेट से इस विधि को याद कर रहा हूं। अनुभवी जेपीए डेवलपर्स इसे कैसे संभालें?
"प्राथमिक कुंजी" शून्य है या नहीं, यह जांचने के बारे में क्या है? –