spring-data-relational icon indicating copy to clipboard operation
spring-data-relational copied to clipboard

Reason: No property 'key' found on class **** Did you mean: key?

Open eatenupme opened this issue 4 years ago • 4 comments

ok do @Table("t_name") and @Component conflict?

eatenupme avatar Feb 24 '21 06:02 eatenupme

Sorry, I can't read that language and I doubt anyone else in the team can. Please update the question to English.

schauder avatar Feb 24 '21 07:02 schauder

do @table("t_name") and @component conflict?

eatenupme avatar Feb 26 '21 09:02 eatenupme

I don't think they should, although it is a weird combination.

@Table is for entities, i.e. things you load from a database or create in your application and persist to a database.

@Component is for well beans, i.e. things that (mostly) get created during startup, and stay around in memory until the application ends, or for a well defined scope, like one web request.

I have a hard time imagining why a class would be annotated with both.

Could you explain your use case or provide a reproducer so that we can determine a workaround or the source of the problem?

schauder avatar Feb 26 '21 09:02 schauder

just for study .

I want to know why.

eatenupme avatar Feb 26 '21 10:02 eatenupme