Is there a difference in declaring the enabled variable as Boolean or boolean? Which is preferable from a memory footprint perspective.
@Entity
class User {
@Column
Boolean enabled;
}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
They’ll both map to the same column type.
From a memory perspective, a primitive would probably be a little lighter, but the difference is almost certainly going to be negligible.
I think a primitive would make it non-nullable, but you could also do that with an annotation.