#16 one-way overriden by default field mappings

closed
None
5
2005-10-31
2005-10-27
Rohan Hart
No

When the beans to be mapped have an identically named
field any one-way mapping is overridden by
MappingUtils.addDefaultFieldMappings

These defaults need to be populated during the custom
mapping stage or use the do-nothing field mapping
suggestion from the "parent field mapping" RFE

Rohan

Discussion

  • Franz Garsombke

    Franz Garsombke - 2005-10-27

    Logged In: YES
    user_id=550744

    Rohan -

    Can you show me your test data and your mapping xml? I want
    to write a unit test case so I can reproduce and fix. I
    might be able to fix this for the 1.5.6 release...the RFE
    will be in 1.5.7...I will refactor all of the default
    mapping stuff at that time.

    Can you also give me a little more info on the do-nothing
    field (class?) mapping you are suggesting? The more info the
    better. We can then get all of this worked out.

    thanks,

    franz

     
  • Franz Garsombke

    Franz Garsombke - 2005-10-27
    • assigned_to: nobody --> fgarsombke
     
  • Rohan Hart

    Rohan Hart - 2005-10-28

    Logged In: YES
    user_id=774102

    Sorry, haven't got a test together but it'd look like...

    mapping from A to B
    field (one-way) mapping from foo to foo

    now make A.setFoo private

    As for the do nothing field mapper, see attached example
    (hacked together just now so handle with care)

    cheers
    Rohan

     
  • Franz Garsombke

    Franz Garsombke - 2005-10-30
    • status: open --> pending
     
  • Franz Garsombke

    Franz Garsombke - 2005-10-30

    Logged In: YES
    user_id=550744

    Ok. After finally figuring out what was going on this was an
    easy fix. Basically, for every one-way field map we now make
    a corresponding ExcludeFieldMap on the other direction.

    This will be in the 1.5.6 release. I will still take your
    suggestion for figuring out default mappings once at
    initialization and remove all the superclass complexity.

    Franz

     
  • Franz Garsombke

    Franz Garsombke - 2005-10-31
    • 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