warning on JPA annotations applied to fields
See original GitHub issueWhat I thought we had decided was that when you have a Java annotation of a Ceylon attribute, then the annotation always gets applied to the field, eliminating any ambiguity that it might be applied to the getter.
And in fact, this is what seems to actually happen. (Phew! I was really worried for a sec.) But I still get a warning from the Java backend:
Ambiguous annotation target: generatedValue could be applied to several targets, use one of generatedValue__FIELD, generatedValue__GETTER to disambiguate
That warning should be removed, I believe.
WDYT, @tombentley ?
Issue Analytics
- State:
- Created 8 years ago
- Comments:35 (35 by maintainers)
Top Results From Across the Web
I want to generate a compile warning for JPA annotations with ...
I've tried using the fully qualified names in the pointcut @javax.persistence.Enumerated(javax.persistence.EnumType.ORDINAL) but still got the ...
Read more >JPA Annotations - Hibernate Annotations - DigitalOcean
JPA annotations are used in mapping java objects to the database tables, columns etc. Hibernate is the most popular implement of JPA ......
Read more >Chapter 2. Mapping Entities - Red Hat on GitHub
JPA entities are plain POJOs. Actually, they are Hibernate persistent entities. Their mappings are defined through JDK 5.0 annotations instead of hbm.xml files....
Read more >The @SuppressWarnings Annotation in Java - GeeksforGeeks
The @SuppressWarnings Annotation in Java ; All, It will suppress all warnings. ; Cast, Suppress the warning while casting from a generic type...
Read more >Lombok and JPA: What may go wrong? - JPA Buddy
Entity classes often get annotated with @EqualsAndHashCode or @Data . The documentation of @EqualsAndHashCode states: By default, it'll use all ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I just tried @DiegoCoronel’s example Swarm app, and I found that when I used
inject
instead ofinject__FIELD
, I still get these useless warnings.I seriously do not know what the purpose of this is supposed to be. If I have:
Seriously what do I care if the
@Inject
annotation gets applied to the field or to the getter? It’s not even confusing to Java folks, since the declaration actually looks like a Java field!So nobody’s going to pick up on what I said about not needing
late
for primitives and optionals?