Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2600

Pojo class can't implement Iterable

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

      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 Unassigned
            Reporter:
            dekker_p Patrick Dekker
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: