Skip to content

Support for @Idless entities [DATAJDBC-470] #698

@spring-projects-issues

Description

@spring-projects-issues

Lovro Pandžić opened DATAJDBC-470 and commented

In our code we usually name our id columns (and in turn, fields) as id.

With Spring Data JDBC integration domain code then looks like

class Foo {

   @Id
   private Long id;

... other code removed for brevity
}

It seems redundant to define a field named id and then to also annotate it with @Id for Spring DATA JDBC to detect it's semantics.

My proposal is a follows:

Add id field detection to either NamingStrategy or some new abstract construct so I can programmatically link my id naming convention with Spring Data JDBC id field detection mechanism so we can reduce required annotations in code to zero


Referenced from: pull request #207

Metadata

Metadata

Assignees

Labels

status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions