Pojo class can't implement Iterable

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Works as Designed
    • Priority: Major - P3
    • None
    • Affects Version/s: 3.5.0
    • Component/s: Codecs
    • None
    • Environment:
      Debian Linux & Windows
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I was experimenting a bit with the POJO support added in 3.5. Just using the automatic PojoCodecProvider. But I noticed a weird behavior.

      When your POJO class implements Iterable. The BSON conversion generates an array type instead document type. I think this is a bug,

      You can reproduce it by using the PojoQuickTour example, Just make the Person implements Iterable<Address>, and implement the iterator<Address> and suddenly the code start failing/

            Assignee:
            Unassigned
            Reporter:
            Patrick Dekker
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: