[jira] Created: (CAY-1097) Attribute types are not generated for primitive ints

From: Andrus Adamchik (JIRA) ("Andrus)
Date: Thu Aug 21 2008 - 05:44:11 EDT

  • Next message: Loiko Dima (JIRA): "[jira] Updated: (CAY-1094) CM DataNode panel reorg - pull the password encoding options into a tab"

    Attribute types are not generated for primitive ints
    ----------------------------------------------------

                     Key: CAY-1097
                     URL: https://issues.apache.org/cayenne/browse/CAY-1097
                 Project: Cayenne
              Issue Type: Bug
              Components: Cayenne Core Library, CayenneModeler GUI
        Affects Versions: 3.0
             Environment: 3.0M4, class generation from CayenneModeler
                Reporter: Andrus Adamchik
                Assignee: Andrus Adamchik
                 Fix For: 3.0

    Not sure if this happens with cgen, but when generating classes from CayenneModeler, primitive int (and other primitives?) attributes result in broken code. This was initially described here:

    http://markmail.org/message/giz4mobirutx3ita

    The generated code looks like this:

    public void setId(int id) {
           writeProperty("id", id);
       }
       public $classGen.formatJavaType(${attr.Type}) getId() {
           Object value = readProperty("id");
           return (value != null) ? (Integer) value : 0;
       }

    -- 
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
    



    This archive was generated by hypermail 2.0.0 : Thu Aug 21 2008 - 05:45:13 EDT