About Question enthuware.oce-jpad.v6.2.563 : Persistent fields of an entity class must be public, private, protected, or package visibility.

Moderator: admin

Post Reply
ETS User

About Question enthuware.oce-jpad.v6.2.563 : Persistent fields of an entity class must be public, private, protected, or package visibility.

Post by ETS User »

According to the explanation persistent fields may be of any visibility because thay are accessed through getters/setters.
But why is the answer to the question:
"Persistent fields of an entity class must be public, private, protected, or package visibility."
still FALSE?
Maybe, I get it wrong, but the explanations says they mustn't...

admin
Site Admin
Posts: 10385
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-jpad.v6.2.563 : Persistent fields of an entity class must be public, private, protected, or package visibility.

Post by admin »

As per section 2.2 of the JPA specification, "The instance variables of a class must be private, protected, or package visibility independent of whether field access or property access is used".

HTH,
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests