HHH-9440 Support for Java 8: parameter names
by Lovro Pandzic
Hello,
I'd like to discuss issue HHH-9440.
Basic idea behind this issue is that we try to and eliminate the
requirement for no arg constructor on entities or at least weaken that
requirement to specific cases.
Construction from both the user code and the hibernate itself would go
through user specified constructors.
This would enable use cases like enforcing invariants in constructors,
immutable entities and in the long run, maybe even support for value types
coming in Java 10 that, at least for now, we know will be immutable and
won't have a no arg constructor.
By using parameter names and Java 8 API you can, for instance, map those
parameter names to fields to find out column mappings and other information
required for mapping arguments to parameters.
A similar approach like this is used by jackson-databind with the
jackson-module-parameter-names (this will soon be integrated into the
jackson-databind itself). Another example, Spring also uses parameter names
to map bean names to parameters in constructors.
There are border cases like the one Steve mentioned in the issue:
> How would you see lazy loading working then?
>
>From my perspective, there are 2 approaches here:
- use a library like Objenesis that enables you to construct classes
without using the constructor
- document that all entities that are to be proxied must have a no arg
constructor
What do you guys think?
9 years, 8 months
Where is Koen?
by Koen Aers
Hi all,
I have PTO until the end of the week. I’ll be checking email from time to time.
Cheers,
Koen
9 years, 8 months
[OGM] Preparing release 5.0.0.CR1
by Davide D'Alto
I've moved the missing issues on the jira to the next next version but I
don't think it's a good idea to make the release and the blog post before
the Easter holidays.
I'm going to complete the release on Tuesday, so. if there is something you
want to include you still have time.
Cheers,
Davide
9 years, 9 months
Using Java8 language features in OGM/HotRod
by Sanne Grinovero
TLRD: don't be surprised if I'll be sending some rather large code
style fixes. Not wasting my time nor intending to waste yours..
I've been writing quite some code enjoying Java 8 specific features in
the new OGM module,
as I assumed this would not be an issue at all since Hot Rod requires
Java8 and we require Java8 to build anyway.
Unfortunately the Checkstyle plugin crashes when it encounters Java8
bytecode ops, something which is easily fixed with a plugin upgrade.
The plugin upgrade however *fixed* some bugs in Checkstyle, for which
it had been accepting some syntax even though we were explicitly
intending to guard against these.
So now there are several (~300) style failures; these are legitimate
failures so my plan is to fix these.
If someone is busy with some rather large refactoring, please speak up
now as I can wait with this, or we can stagger this cleanup by sending
the fixes for some modules only, and the remaining later.
P.S. I'd rather cleanup the bad code than revert my Java8 code.. both
as a lesser effort, and as a better ultimate result.
Thanks,
Sanne
9 years, 9 months
Mail System Error - Returned Mail
by Mail Administrator
�0������p�H1Ns)���N�O{iv��H��gx�6�v7�H)x�p�1�C�{�.Or��XN�s��)dQ�{% j��"#�������k��k���k�G�n��E����j�*�jOu��nB���6����04H��ch�AD������{
n�l��f�X��?������'��Cug]�������G�D���n��){`&�R���U�h�}� `N"8ZDJU�L�����D�A�U{����T/�B�O�>
'�����G�%5�<g#>�Ez���\>�v$9T����qx!
�������/i�SV��QT�xp���T��X�hm]�Hu�[����Wi��{�����dh,y��C`�PV��ZV�0R`��N������\�����O��
)iE#���d{?l�b�M����f����r��ce�45��i�f�ax7��A����MD�<�[6��F�x�`�5�{���S�qT�*d����T.�pj������
BZ���8Jr�M��VS�����D\K�
y.��G|��./#�Wh����n�fIm�C�;��x7���WK��o�S�������}%�E�c��q��-V
_{�������!��oCXS�����'����0q�s��dP.�`�� �l��-�9�,�QSg{G����6b9��t�<g���0��8��[9Y��:�#k�c���h��o�I����j��n�$����(�G�zR� [
����G�� �D
q�%;tu54����������"�~�����a��{6^[�2x��;� ���n�I��#��{�����������w*/8�f���}1GXU�X2)�{�,�����!z�C�
��A�~�-`���c�``�6<N�
S�����z�U��0�����r'�{|p������we�����a����s
H6"�yD�?�%�J�1��u�y]�gF��,����~���������6{�Py���.aLT�j���Py��G�
����dM>��|�Of,� ��u��or��������^�!��-c�������D�c�4�6$�o�5��Zp���D������x��{GS��)�C�0�Q�&�\$A[#�uHy��s��<)�
V�xQ�|F��x3�u���!��dK�b�axWr8)��<7t����;Q�R&�����jo�*G�sOR�C���R��������5�/�)WW6s�p�^��c���K�e
&�5�"I���.U�g���<��knk�B�M�����<w�Q��{b���ZE$�Au��W
�����D��],��vh�ieOep�M���1
s�����Z]�(^ot�
�R��������&(�%��H�T�����5&��
��2S�B
vF�0�����E�^����VT�o���m:��*fU�P/�o���zOB|J�v#0��"svw/8Q����a� ��%�F;��V`�Jmr��v������J&Gdf�5W3���
����Y����/j v��>�)y�Vk�w.�$h^��wzk5d}�x��8����y{zr!4�a���\�������#������p4�ib
��o�,
��P|�!���Ct�����0,��������y�^q��UXL�<�Z���-V�.�0-ClYE]��3�������D�#I�|f,~�\�|n�a�Pm&������
��($��8���h��_�����~����l�c���Y6�F��>hl�����W����������D��
H*i{F�-V���Dg�2������(pA����k�|��B���[g�3O'/���.�5�}K���GR�D
9 years, 9 months