Example Lecture: Basic Entity Mappings (JPA for Beginners)

preview_player
Показать описание
Special Pre-Launch Offer:

This is one of the lectures of my JPA for Beginners Online Training. If you enjoyed it, you shouldn't miss the other videos and exercises in this course. You will learn:
- how to customize your mappings,
- how to use the entity lifecycle model to persist, update and remove entities,
- how to write custom queries to retrieve the information you need in your use case
- and much more.

Рекомендации по теме
Комментарии
Автор

Done thanks
Entity needs public or protected noargs constructors
Can exclude variables from being mapped to db
For each entity we need to annotate at least one attribute or getter as the primary key
When annotating entity attribute, JPA provider will access the attribute directly, not through getter 5:19

mostinho
Автор

Such a great and clear explanation. Thank you!

bigywhile
Автор

Thanks for this great video. Is it mandatory to have a protected or public no-arg constructor for an Entity as I can see it works perfectly fine
with a private one?

iftekharkhan
Автор

I have a question: Why the data type for the identifier is the Wrapper class "Long". Why don't use the primitive data type? And if the Proffesor class had these properties: edge and salary. Do you use the Wrapper Class or primitive tipes? What do you recommend to use? And why?. Thanks

FranklinXPe