79757552

Date: 2025-09-06 12:51:38
Score: 2
Natty:
Report link

As a Java developer, I strongly recommend using ID instead of <tableName>_id in case of primary key.

When working with @OneToOne, @ManyToOne or @ManyToMany properties, you need to specify the @JoinColumn annotation with the values ​​of the "name" and "referencedColumnName" properties. When they have the same values, it can be very confusing. Although I understand that by default for a primary key, referencedColumnName is not used, but sometimes it is inconvenient and takes a little more time.

Reasons:
  • No code block (0.5):
  • User mentioned (1): @OneToOne
  • User mentioned (0): @ManyToOne
  • User mentioned (0): @ManyToMany
  • User mentioned (0): @JoinColumn
  • Low reputation (0.5):
Posted by: zenon