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

عرض عملي: مراقبة سياق الاستمرارية عبر تسجيل SQL

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

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

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

في هذا الدرس

see when SQL really runs; prepares JNR-027-LAB1 and JNR-028.

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

خطوة بخطوة

  1. Enable spring.jpa.show-sql (or logging.level.org.hibernate.SQL=DEBUG) in a throwaway sandbox project.
  2. Call find twice for the same id inside one transaction; count the selects (one).
  3. Change a field on the loaded entity and print a marker line before the transaction ends; show the update appears after the marker, at commit.
  4. Planned mistake: call find outside any transaction and change a field; show nothing is saved, then add a transaction.
  5. Summarize: identity map avoided a query, unit of work delayed the update.

التطبيق

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

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

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

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