[ http://jira.andromda.org/browse/SPRING-162?page=all ]
Chad Brandon closed SPRING-162:
-------------------------------
Fix Version: 3.2-RC1
Resolution: Fixed
This is fixed.
"To finalize, another question: Why are converted Date attributes in model to
Calendar attributes in java code?? "
Because you're probably using webservices (or at least have them enabled in
your andromda.xml), and webservices require Calendars for date types. So to
get around this, we don't provide automatic population between entities and
value objects for date types when webservices are enabled.
> Conflict between Calendar and Date types on value object constructors
> ---------------------------------------------------------------------
>
> Key: SPRING-162
> URL: http://jira.andromda.org/browse/SPRING-162
> Project: Spring Cartridge
> Type: Bug
> Versions: 3.2-RC1
> Environment: Windows XP
> Maven 1.0.2
> Reporter: Sandra MartÃn Ruiz
> Assignee: Chad Brandon
> Fix For: 3.2-RC1
>
> When I create a value object with "Date" attributes in my model, the class of
> this value object is created with "Calendar" attributes.
> Some days ago, there were no problems because on to__VO methods when an
> instanced was created, constructor call was made without typecasting for null
> values:
> public com.project.vo.ObjetoComisionVO toObjetoComisionVO(final
> com.project.domain.ObjetoComision entity) {
> com.project.vo.ObjetoComisionVO objetoComisionVO = new
> com.project.vo.ObjetoComisionVO(
> entity.getDescription(),
> null, <-----
> );
> return objetoComisionVO;
> }
> public ObjetoComisionVO(java.lang.String description, java.util.Calendar day)
> {
> ....
> }
> public com.project.vo.ObjetoComisionVO toObjetoComisionVO(final
> com.project.domain.ObjetoComision entity)
> {
> com.project.vo.ObjetoComisionVO objetoComisionVO = new
> com.project.vo.ObjetoComisionVO(
> entity.getDescription(),
> (java.util.Date) null, <----- !!!!!!!!!!!!!!!!!!!!!!!!!!!!
> Error
> );
> return objetoComisionVO;
> }
> public ObjetoComisionVO(java.lang.String description, java.util.Calendar day)
> {
> ....
> }
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.andromda.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642