Mapping deep properties with intermediate collections in dozer

前端 未结 3 1702
一个人的身影
一个人的身影 2021-02-09 16:29

Suppose I have the following classes

public class Baz {
  private List foos = new ArrayList();
}

public class Foo {
  private String strin         


        
3条回答
  •  囚心锁ツ
    2021-02-09 17:12

    I think, you can write such a mapping

    
      Baz
      Target
      
        foos
        fooStrings
      
    
    
     
      
        
          Foo
        
        
          String
        
      
    
    

    And implement CustomFooConverter to get string field of foo and return it as a String.

    I think you can post a feature request to support mapping to primitives as

    
      Foo
      String
      
        string
      
    
    

    into Dozer GitHub

提交回复
热议问题