Joe
Joe

Reputation: 4542

Telosys code generation fails when the table has foreign key

I have a issue when generating code using Telosys.

After configuring all the information, when I click on Create model

DB configuration

I get the following issue:

Create model issue

If I remove foreign key from table and click Create model then this works fine.

It has become like have to remove the foreign key from table and Create model and then add back the foreign key again.

How to do this without removing foreign key constraint?

PS: I just use this tool to create Spring JPA entity.

Upvotes: 0

Views: 983

Answers (2)

lgu
lgu

Reputation: 2460

After looking in the source code it seems that the table name referenced by the FK is not found in the model.

May be due to upper case / lower case difference in the table name. For example a FK referencing the "Foo" table instead of "FOO" (or vice versa).

You can check the table names retrieved from the database with "Get tables" in the "Meta-data" tab. Use "Get foreign keys" to check the Foreign Keys :

enter image description here

Upvotes: 2

rodridevops
rodridevops

Reputation: 1997

I guess you skipped configuration. You can customize existing templates in order to generate jpa DAO

the templates available on GitHub : https://github.com/telosys-templates-v3

Upvotes: 1

Related Questions