عرض عملي: حالات الكيان في المُنقّح (Debugger)
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
observe entity states and flush timing live; prepares JNR-028-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Put breakpoints in a transactional test around
new,persist, a setter, and the end of the method. - Inspect the entity: id
nullwhile transient; useentityManager.contains(p)to show managed. - Change a field and show that the SQL log stays silent until
flush()or commit. - Planned mistake: modify an entity after the transaction ended (detached); show nothing is saved, then fix with
mergeinside a transaction. - Call
removeand show theDELETEis sent at flush.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.