isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <...@haywood-associates.co.uk>
Subject Re: Isis validation error because of optional property on Isis 1.8.0
Date Fri, 28 Aug 2015 17:00:24 GMT
Hi Erik,

I suspect the issue is because the datatype is a primitive (int), for which
nullable/optional doesn't make sense.

Perhaps change it to Integer?

Also: if you want a property to be always hidden, I generally use
@Programmatic rather than @Property(hidden=Where.EVERYWHERE).  The
difference is that the property is excluded from the Isis metamodel.
(Though if you are using auditing or XmlSnapshot or similar, then you'll
want to stay with @Property).

HTH
Dan



On 28 August 2015 at 16:39, Erik de Hair <e.dehair@pocos.nl> wrote:

> While starting our application I get the following error:
>
> nl.pocos.dom.billing.specification.AbstractTelephonySpecification#cdrExportId:
> incompatible Isis' default of required/optional properties vs JDO; add
> @javax.jdo.annotations.Column(allowNulls="...")
>
> The property is defined as follows:
>
> @Property(hidden=Where.EVERYWHERE)
>     @Column(name = "export_id", allowsNull = "true")
>     public int getCdrExportId()
>     {
>         return cdrExportId;
>     }
>
> Another property, defined likewise, has no problems:
>
> @Column(name = "verlengingstermijn", allowsNull = "true")
>     public int getAutomaticProlongationPeriod()
>     {
>         return automaticProlongationPeriod;
>     }
>
> I tried adding Optionalitity with no effect:
> @Property(hidden=Where.EVERYWHERE, optionality=Optionality.DEFAULT) and
> Optionality.OPTIONAL
>
> I must be missing something.
>
> Erik
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message