Now that java 8 supports named parameters it becomes possible (potentially preferrable) to use constructor injection instead of circumventing encapsulation to set values on private fields.
This shows itself as a potential win when integrating with Kotlin with disallows the circumvention quite forcefully. Meaning: without constructor injection the object needs setters. And, if it has setters then it's mutable which is against best practices. I propose optionally using constructor injection when marshalling an object from data sources in a DB. I am willing to make the changes if I know they can/will be incorporated. Thoughts? Here is the ticket https://hibernate.atlassian.net/browse/HHH-11791 _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev