no-argument constructor

A constructor that takes no parameters, which JPA requires on every entity so it can create the object before filling in its fields.

In more detail

It may be protected to discourage application code from creating half-built entities. Records cannot be JPA entities partly because they have no such constructor.

Example

protected OrderEntity() { }

Related terms

Taught in

References

Certification courses