3 ms·
"The relationships exist only in the database" Entity Person contains collection of entity ContactInfo. In DB we have tables PERSON, CONTACT_INFO and foreign ke
by Zvez 15y ago
"The relationships exist only in the database"
Entity Person contains collection of entity ContactInfo. In DB we have tables PERSON, CONTACT_INFO and foreign key from CONTACT_INFO to PERSON. What the difference in relations in code (between entities) and in DB between tables? In this example.
- deleted 15y ago[deleted]
- JulianMorrison 15y agoI wonder if you understood what I was saying? A tool like "mybatis" just reads and creates unproxied POJOs. The relationships are in the DB and are expressed in the SQL. The result objects are just results. With this type of Data access, there is no duplication between the DB's relationships and the ORM's relationships which shadow them.