cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAY-2558) cgen: primitives for mandatory properties
Date Wed, 17 Apr 2019 07:25:00 GMT

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

Nikita Timofeev commented on CAY-2558:
--------------------------------------

[~andrus], [~johnthuss] I believe this was true for 4.1M1.
 Just checked this on 4.1.B1, seems ok to me:
{code:java}
protected int primitiveMandatory; // int and mandatory in modeler
protected Integer primitive; // int and not mandatory
protected Integer boxed;  // java.lang.Integer and not mandatory
protected Integer boxedMandatory; // java.lang.Integer and mandatory
// ...
public int getPrimitiveMandatory() {
  // ...
}
public int getPrimitive() {
  // ...
}
public Integer getBoxed() {
  // ...
}
public Integer getBoxedMandatory() {
  // ...
}
{code}

> cgen: primitives for mandatory properties
> -----------------------------------------
>
>                 Key: CAY-2558
>                 URL: https://issues.apache.org/jira/browse/CAY-2558
>             Project: Cayenne
>          Issue Type: Improvement
>          Components: cgen
>    Affects Versions: 4.1.B1
>            Reporter: Ilya Vasiuk
>            Priority: Major
>
> Would be cool to have possibility to not use primitives in object entities for mandatory
properties. 
> Case: Somebody can forget to init some mandatory int field. And they'll get a lot of
rows with zeros instead of exception. This is not convenient imo.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message