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

ماذا يفعل ORM

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

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

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

في هذا الدرس

list what an ORM automates and what it costs.

الموضوعات المخطط لها

  • ORM (object-relational mapper) maps classes to tables and generates SQL for you.
  • It automates: insert/update/delete/select statements, row-to-object conversion, id handling, and change tracking.
  • It costs: hidden SQL, surprise queries, a learning curve, and a performance model you must understand.
  • It does not remove the need to know SQL; you still design tables and read the generated statements.
  • JPA is the Java standard (a specification); Hibernate is the common implementation.
تفاصيل المخطط المبدئي

عرض عملي

java
Product p = em.find(Product.class, 42L); // select ... where id = 42
p.setPrice(new BigDecimal("9.99"));      // no SQL yet; update is generated later

اختبر فهمك

Is JPA a library or a specification?

أظهر الإجابة

A specification; Hibernate implements it.

التطبيق

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

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

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

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