0

I am using Telosys to generate my DAL layer from database and it is working smoothly. However I have noticed that it only generates field annotation for Identity fields as AUTO

@GeneratedValue(strategy=GenerationType.AUTO)

I have in my database primary key fields set to Identity and a sequence is provided by Postgres. But when I generate my entity class it only shows annotation as AUTO whereas I want it to generate Idendityt:

@GeneratedValue(strategy=GenerationType.IDENTITY)

I checked the source code for JPAAnnotations class and it has the logic to generated IDENTITY annotation.

Am I missing something? Also, how can I upgrade my eclipse plugin to use Telosys 4.x version?

Thank you Telosys team.

Sandiip Patil
  • 456
  • 1
  • 4
  • 21

1 Answers1

0

Telosys 4 is not yet available as an Eclipse plugin (work in progress).

In the meantime, you can use Telosys CLI.

NB : since version 4 there is a unique model type : the "DSL model", is you are starting from an existing database the DSL model will be created from the database schema (instead of the previous specific "database model" based on XML)

lgu
  • 2,342
  • 21
  • 29
  • So there is no way to generate the id field as IDENTITY? – Sandiip Patil Jul 18 '22 at 16:22
  • 1
    Not with a "DSL model" in "version 3.3" "@GeneratedValue(IDENTITY)" is available since version 4.0 That's why I advise to switch to v 4.0 (with Telosys CLI) – lgu Jul 18 '22 at 16:40