jhorvath commented on code in PR #6107:
URL: https://github.com/apache/netbeans/pull/6107#discussion_r1241970413


##########
enterprise/micronaut/src/org/netbeans/modules/micronaut/db/MicronautEntity.java:
##########
@@ -473,8 +540,13 @@ protected Property createProperty(EntityMember m) throws 
IOException {
                     }
                 }
 
-                if (!columnAnnArguments.isEmpty() && generateJPA) {
-                    
annotations.add(genUtils.createAnnotation("javax.persistence.Column", 
columnAnnArguments)); //NOI18N
+                if (!columnAnnArguments.isEmpty()) {
+                    if (generateJPA) {
+                        
annotations.add(genUtils.createAnnotation("javax.persistence.Column", 
columnAnnArguments)); //NOI18N
+                    }
+                    if (isPKMember && needsPKClass && jakartaSupported) {

Review Comment:
   If isPKMember and needsPKClass is true and jakartaSupported false, generated 
is not valid. Jakarta annotations are needed for PK class. Generation should 
fail in this case and user should be notified to add jakarta.persistence to the 
project



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to