cayenne-commits mailing list archives

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

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

Andrus Adamchik commented on CAY-2558:
--------------------------------------

> Currently if an attribute is defined in modeler with type "java.lang.Integer", if the
property is mandatory the instance variable will have type "int". While that probably improves
memory usage it does seem to go against the user's stated desire to use java.lang.Integer
not just for the type of the getter and setter but also for storage. So yeah, I think the
instance variable's type should match what is declared in modeler.

Oh, if this is so, this is a bug. Although of course a different issue than what was reported
in this Jira, we still need to address it.

cc [~ntimofeev]

> 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