Question | Small Description |
---|---|
Map calculated properties with JPA and Hibernate | Mapping calculated entity properties. Ex- if we need one property which will count the number of row of that particular entity/table.We can use this annotation and pass appropiate SQL functions. |
ManyToOne Relationship | ManyToOne relationship is generate optimal SQL query for every DML query.Basically it hold the foreign key relationship. |
ManyToOne association using a non-Primary Key column | @ManyToOne annotation when the Foreign Key column on the client side references a non-Primary Key column on the parent side. |
Unidirectional/Bidirectional @OneToMany | Unidirectional @OneToMany is not so good while performing DML opertaion. Better to make it bidirectional. |
store date, time, and timestamps in UTC time zone | Dealing with time zones is always challenging. As a rule of thumb, it’s much easier if all date/time values are stored in the UTC format, and, if necessary, dealing with time zone conversions in the UI only.This article is going to demonstrate how you can accomplish this task with JDBC and the awesome hibernate.jdbc.time_zone configuration property. |
Bidirectional ManyToMany association with extra column | In Join table if we need an extra column then we have to use @manyToOne and @OneToMany annotation for configuration. But while retriveing the data the utility method is generating one extra SELECT statement. |
Unidirectional ManyToMany Extra Column | When mapping the intermediary join table, it’s better to map only one side as a bidirectional @OneToMany association since otherwise a second SELECT statement will be issued while removing the intermediary join entity. |
-
Notifications
You must be signed in to change notification settings - Fork 0
ukbr54/hibernate_tutorial
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published