Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

OneToMany in camel-bindy

$
0
0
Guys,

Is this OneToMany a true OneToMany? I guess it only applies when the entire
CSV file has some common elements? I have a file that has entries like
below:

1,abc,def,joe
1,abc,xyz,san
2,abc,mno,ram
3,abc,fgh,sam

When I tried with the above file which used the OneToMany annotation between
the Id and the rest of the fields, it threw an error saying that pos 2 must
be defined. I later took a look into the Camel documentation for bindy and
realized that the id's should all be the same throught the CSV file.

Can we model the OneToMany in such a way that it takes a parameter for the
position and uses this to identify which field will be the One side?
Something like:

OneToMany(pos=1)

Is it reasonable enough to raise a Jira and provide a fix. I would be happy
to provide a fix.

Regards,
Joe

Viewing all articles
Browse latest Browse all 5648