انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهJNR-028-L08

عرض عملي: حالات الكيان في المُنقّح (Debugger)

  • الدرس 8 من 8
  • Junior
في هذا الدرس 3 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

observe entity states and flush timing live; prepares JNR-028-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Put breakpoints in a transactional test around new, persist, a setter, and the end of the method.
  2. Inspect the entity: id null while transient; use entityManager.contains(p) to show managed.
  3. Change a field and show that the SQL log stays silent until flush() or commit.
  4. Planned mistake: modify an entity after the transaction ended (detached); show nothing is saved, then fix with merge inside a transaction.
  5. Call remove and show the DELETE is sent at flush.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.