#13 Use of Default ClassMap with date formatting

closed
None
5
2005-10-13
2005-10-11
No

I am facing this problem. I have following two classes
public class DataForm {
private String currentDate;
private String amount;
private String name;
}

public class DataParam {
private Date currentDate;
private Long amount;
private String name;
}

And my mapping file has
<mappings>
<configuration>
<dateFormat>dd/MM/yyyy</dateFormat>
</configuration>
</mappings>

Now when I try to convert the date it throws an
exception that time not
specified
in millis. Now when I put a dummy mapping (which I
think should not be
required
unless you have collection ... or beans are different)

<mapping>
<classA>com.tavant.homer.dto.DataForm</classA>
<classB>com.tavant.homer.dto.DataParam</classB>
</mapping>

Then it works!!
When I debug the code I found that when the Dozer is
not able to find a
mapping
for the given conversion it generates a default
classmap ... but in
doing so
it ignores the configuration level mapping of
Convertors and dateformat
(actually
the ConvertorContainer is null and specified dateformat
is not
registered for
conversion)

I think it should at least you the configuration level
formats when
generating
default class map

Discussion

  • Franz Garsombke

    Franz Garsombke - 2005-10-12

    Logged In: YES
    user_id=550744

    This has been fixed for 1.5.5.

    If there are multiple config files each with a global
    configuration... the rule is that we will use the last
    mapping file that we parse.

     
  • Franz Garsombke

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

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