java - orika - one-way mapping -


i'm trying one-way mapping work @ class level.

i have 2 classmaps below:

mapperfactory.classmap(a.class,b.class).toclassmap()  mapperfactory.classmap(b.class,a.class).toclassmap() 

these classmaps cannot work bidirectional mapping. so, i'm using 2 different mappings. using 2 different classmaps bi-directional mapping making none of above work. i'm looking way use classmap one-way mapping can use both of above.

any appreciated. thanks.

in orika considered same class map (look @ mapperkey class [a,b] <=> [b,a]), can have different direction on field level within same class map definition.

to answer question (if understand) should use 2 mapperfactory.

like atobmapperfactory , btoamapperfactory can have different class map definition each direction (as said within single mapper factory not possible)


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -