tommysiu / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 0 forks source link

@Fields annotation ignored when marshalling collection inside group #111

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?  If applicable, please provide a
mapping configuration and sample record input to recreate the problem.
1. Configure a record class (using @Record) with a literal field using @Fields 
annotation.
2. Configure a group class (using @Group) containing a collection of record 
defined in 1.
3. Marshall an instance of group define in 2.
See project sample for more details.

What is the expected output? What do you see instead?
It's expected that the literal field appears in all lines representing the 
collection, but nothing is wrote.
See project sample for more details.

What version of BeanIO are you using? What JDK version?
2.1.0.M2

Original issue reported on code.google.com by elvis...@gmail.com on 5 Jun 2014 at 1:41

Attachments:

GoogleCodeExporter commented 8 years ago
The problem is in createRecord method of AnnotationParser. @Fields annotation 
must be seeked in parametrized type of collection, not in collection type 
itself. Follows the patch.

Original comment by elvis...@gmail.com on 5 Jun 2014 at 2:32

Attachments:

GoogleCodeExporter commented 8 years ago
Good catch, and thanks for the patch!  Fixed for 2.1.0.

Original comment by kevin.s...@gmail.com on 27 Jul 2014 at 8:06

GoogleCodeExporter commented 8 years ago

Original comment by kevin.s...@gmail.com on 27 Jul 2014 at 8:06

GoogleCodeExporter commented 8 years ago

Original comment by kevin.s...@gmail.com on 7 Sep 2014 at 2:18