jaxio / celerio-angular-quickstart

Generate an Angular 5 CRUD application from an existing database schema (we provide a sample one)
Apache License 2.0
481 stars 138 forks source link

OneToOne Relation bidirectional not display #24

Closed achablowski closed 7 years ago

achablowski commented 7 years ago

Hi,

I have a OneToOne bidirectional. but the relation only appears on the side with the column. The entity is generated properly, with the annotation @OneToOne but the template doesn't generate attribute in entity-detail for this one.

Do you have a solution or a fix ? I wanted to display the relation with "Go To" button in both side.

Thanks

achablowski commented 7 years ago

`#foreach($attr in $entity.formAttributes.flatUp.list)

if ($attr.isSimplePk() && !$attr.jpa.isManuallyAssigned())

no need to display it...

elseif($attr.isSimpleFk())

xToOneEdit($attr.getXToOneRelation())`

the macro "xToOneEdit" isn't called on the entity mappedBy

nromanetti commented 7 years ago

fixed + provide an example (with user and passport tables)