0

I have a Model where I have multiple booleans that go to the database.

But I also want to have another boolean that does not go to the database but instead it returns if all the other booleans are checked or not.

In my class I added this:

@Null
@Transient
private boolean overall;

And in my getOverall I have return boolean1 && boolean2 .. etc

But I get an error:

ConstraintViolationImpl{interpolatedMessage='must be null', propertyPath=overall,

I just want to return this variable on the GET method and IGNORE in POST If I remove the annotations I get

ORA-00904: "APPLICATIO0_"."OVERALL": invalid identifier

when trying to make a post

Rot-man
  • 18,045
  • 12
  • 118
  • 124

1 Answers1

0
@Null - The annotated element must be null

It restricts your overall boolean variable from having any value (true or false). But you are trying to assign value based on your other flags which causes the problem. In general, it is not good practice to use @Null

Romil Patel
  • 12,879
  • 7
  • 47
  • 76