We are using
pojo = PojoClass
c2j = Cfg2JavaTool
c2h = Cfg2HbmTool
for writing freemarker templates in our project.
Requirement : Generate POJOs with JPA annotations from reading the Database.
We require to identify OneToOne relationships between tables.
However in c2h we can only find methods relating to ManyToOne,OneToMany and ManyToMany and they are working fine.
Is there a way to find OneToOne Relationship?
If the foreign key of one table is unique and is associated with another table.This means OneToOne. So can we find this using the methods in c2j,c2h or pojo? pojo.generateAnnTableUniqueConstraint() generates the constraint in the pojo which has the foreignkey but how can the other associated table detect the same?