DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34444>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34444

           Summary: [betwixt] Betwixt does not support polymorhpic types in
                    collections
           Product: Commons
           Version: unspecified
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Betwixt
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: [EMAIL PROTECTED]


Say a class A has a collection with elements of an interface type B which has
two subtypes:

class A
{
  private List bs;

  public Iterator getBs();
  public void addB(B b);
}

interface B
{}

class C implements B
{}

class D implements B
{}

with the following mapping

<?xml version="1.0"?>
<betwixt-config>
  <class name="A">
    <element name="a">
      <element property="bs"/>
    </element>
  </class>
  <class name="C">
    <element name="c"/>
  </class>
  <class name="D">
    <element name="d"/>
  </class>
</betwixt-config>

However for an instance of A with both instances of C and D in the collection,
no c or d sub elements are generated but B elements instead.
The attached unit test exemplifies this.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to