#55 ClassMap not found for interface mapping

closed
None
5
2007-02-09
2006-09-08
Rob Volden
No

I have a mapping defined where class-a is an
interface and class-b is a concrete class:

<mapping wildcard="false">
<class-a>com.xxx.SubscriberIF</class-a>
<class-b>com.xxx.UpdateMember</class-b>
<field>
<a>subscriberNumber</a>
<b>subscriberKey.subscriberNumber</b>
</field>
...
</mapping>

This mapping works fine if I use the mapping method
mapper.map(source, UpdateMember.class), but if I use
mapper.map(source, updateMember), passing an existing
UpdateMember object, the mapping is not found in
ClassMapFinder.findClassMap().

It seems like we shouldn't be checking the isInstance
flag in ClassMapFinder.findClassMap().

Discussion

  • Rob Volden

    Rob Volden - 2006-10-25

    Example test case

     
  • Rob Volden

    Rob Volden - 2006-10-25

    Logged In: YES
    user_id=1593586

    Attaching example test case which shows this bug. On further analysis, the
    bug occurs when the source object (ApplicationUser in my example) extends a
    class (Subscriber in my example) which implements the interface specified in
    the mapping file (SubscriberIF in my example).

     
  • Matt Tierney

    Matt Tierney - 2006-12-09

    Logged In: YES
    user_id=1236069
    Originator: NO

    Rob,

    Thanks for the unit tests. Everything worked great and I made the code change. This will be included in the 2.5 release.

     
  • Matt Tierney

    Matt Tierney - 2006-12-09
    • assigned_to: nobody --> mhtierney
    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 45 days (the time period specified by
    the administrator of this Tracker).

     
  • Matt Tierney

    Matt Tierney - 2007-01-24

    Logged In: YES
    user_id=1236069
    Originator: NO

    reassign to pending status

     
  • Matt Tierney

    Matt Tierney - 2007-01-24
    • status: closed --> pending
     
  • Matt Tierney

    Matt Tierney - 2007-02-09
    • status: pending --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks