[ 
https://issues.apache.org/jira/browse/CAY-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042773#comment-13042773
 ] 

Michael Gentry commented on CAY-1575:
-------------------------------------

This appears to be an issue when using Java primitive types.  The original 
Embeddable Java type used "long" (as seen in the setter in the original 
ticket).  When changed to "java.lang.Long" the code generates without 
compilation errors:

    public void setTimeToFlip(Long timeToFlip) {
        propertyWillChange("timeToFlip", this.timeToFlip, timeToFlip);
        this.timeToFlip = timeToFlip;
    }
    public Long getTimeToFlip() {
        return timeToFlip;
    }


> Error generating Embeddable classes in Cayenne Modeler
> ------------------------------------------------------
>
>                 Key: CAY-1575
>                 URL: https://issues.apache.org/jira/browse/CAY-1575
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Modeler
>    Affects Versions: 3.0.1
>         Environment: Linux, OS X, and probably Windows (unverified)
>            Reporter: Michael Gentry
>            Priority: Critical
>
> When generating classes in Cayenne Modeler, the getters for Embeddables are 
> messed up:
>     public void setTimeToFlip(long timeToFlip) {
>         propertyWillChange("timeToFlip", this.timeToFlip, timeToFlip);
>         this.timeToFlip = timeToFlip;
>     }
>     public $classGen.formatJavaType(${attr.Type}) getTimeToFlip() {
>         return timeToFlip;
>     }
> Note that the setter is fine while the getter still has Velocity tokens 
> present.  This will not compile.  I didn't test if this same problem exists 
> using external generation.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to