I was debugging some odd code and I found a problem.
When my code looked like this. That is, with a space between the annotation EclipseLink was not able to pick-up some of the annotations.
@Id
@GeneratedValue(generator = "EDGE_PK", strategy = GenerationType.SEQUENCE)
@SequenceGenerator(name = "EDGE_PK", sequenceName = "SEQ_EDGE_ID")
@Column(name = "EDGE_ID", nullable = false)
private Long edgeId;
If I remove the space then the system started working as expected.
Is it legal to have a space between annotations like I have or does it change the meaning? Ie, some apply to the class instead of the variable.
Edit: I'm using Eclipse right now
Whitespace between annotations is completely irrelevant, it seems to me that you found a quirk in your IDE regarding annotation on-screen display.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With