-
Notifications
You must be signed in to change notification settings - Fork 623
Record entity that lacks an id #33608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: integration
Are you sure you want to change the base?
Record entity that lacks an id #33608
Conversation
|
!build |
|
Your Open Liberty Personal Build request is at https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?pipelineId=d3efac1d-515a-4637-a871-781b8c4cf408 Note: Target locations of links might be accessible only to IBM employees. |
...data.internal.persistence/src/io/openliberty/data/internal/persistence/orm/EntityParser.java
Show resolved
Hide resolved
...sistence/resources/io/openliberty/data/internal/persistence/resources/CWWKDMessages.nlsprops
Show resolved
Hide resolved
...data.internal.persistence/src/io/openliberty/data/internal/persistence/orm/EntityParser.java
Show resolved
Hide resolved
|
https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?pipelineId=d3efac1d-515a-4637-a871-781b8c4cf408 - Open Liberty Personal Build completed with errors/failures. |
...sistence/resources/io/openliberty/data/internal/persistence/resources/CWWKDMessages.nlsprops
Show resolved
Hide resolved
…liberty/data/internal/persistence/resources/CWWKDMessages.nlsprops Co-authored-by: Kyle Aure <[email protected]>
|
!build |
|
Your Open Liberty Personal Build request is at https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?pipelineId=ecfaec28-7966-440b-990e-f930573f2a4e Note: Target locations of links might be accessible only to IBM employees. |
Code analysis and actionsDO NOT DELETE THIS COMMENT.
|
helyarp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The messages are well written. I've suggested a change to one message.
| the clauses: SELECT, FROM, and WHERE. | ||
|
|
||
| CWWKD1121.record.lacks.id=CWWKD1121E: The {0} record cannot be used as an entity \ | ||
| because it lacks a unqiue identifier. One of the record components ({1}) must \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of One of the record components ({1}), change it to The ({1}) record component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@helyarp thanks for reviewing so quickly.
{1} is actually a list of the record components, so this will look like,
CWWKD1121E: The org.example.Person record cannot be used as an entity
because it lacks a unqiue identifier. One of the record components (ssn, firstName, lastName, birthday) must ...
so it would be incorrect to say "The record component" because the value has multiple.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@njr-11 Hi, thanks for the explanation. Keep what you have. I'll add the ID reviewed label.
|
https://libh-proxy1.fyre.ibm.com/cognitive/pipelineAnalysis.html?pipelineId=ecfaec28-7966-440b-990e-f930573f2a4e - Open Liberty Personal Build completed with errors/failures. |
I noticed a user attempting to use an entity that was missing a unique identifier and also not annotated
@Entity. If the latter were present, Jakarta Persistence would raise an error and we even have an error path test for that already. However, in this case, there was no@Entityannotation, and we missed detecting any problem until ending up with a NullPointerException and raised a misleading error message.release buglabel if applicable: https://github.com/OpenLiberty/open-liberty/wiki/Open-Liberty-Conventions).