[ 
https://issues.apache.org/jira/browse/CAMEL-12009?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16252791#comment-16252791
 ] 

ASF GitHub Bot commented on CAMEL-12009:
----------------------------------------

GitHub user khaledalturkestani opened a pull request:

    https://github.com/apache/camel/pull/2092

    CAMEL-12009: Generate headers when OneToMany tag

    Includes unit test

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/khaledalturkestani/camel 
CAMEL-12009-onetomany-css-header

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/2092.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2092
    
----
commit 3c0240c6d01d688490d0a9a807d337e3a11dbc68
Author: Khaled AlTurkestani <[email protected]>
Date:   2017-11-15T01:16:57Z

    CAMEL-12009: Generate headers when OneToMany tag
    
    Includes unit test

----


> Bindy - Missing Headers from OneToMany Field
> --------------------------------------------
>
>                 Key: CAMEL-12009
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12009
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-bindy
>            Reporter: Khaled AlTurkestani
>            Priority: Minor
>
> When generating a CSV header, the code doesn't follow the @OneToMany field 
> and thus doesn't print its fields in the header. For example, when 
> marshalling a list of Orders (List<Order>) where the classes are the ones 
> below: 
> {code}
> @CsvRecord(separator = ",", generateHeaderColumns = true)
> public class Order {
>     @DataField(pos = 1)
>     private int orderNumber;
>     @DataField(pos = 2)
>     private String customerName;
>     @OneToMany
>     private List<OrderItem> items;
> }
> {code}
> {code}
> @CsvRecord(separator = ",", generateHeaderColumns = true)
> public class OrderItem {
>     @DataField(pos = 3)
>     private String sku;
>     @DataField(pos = 4)
>     private int quantity;
>     @DataField(pos = 5)
>     private int unitPrice;
> }
> {code}
> we get the following header:
> +orderNumber,customerName+
> when, instead, we should be getting the following header:
> +orderNumber,customerName,sku,quantity,unitPrice+



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to