You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Erik de Hair <e....@pocos.nl> on 2015/08/28 17:39:56 UTC
Isis validation error because of optional property on Isis 1.8.0
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
Re: Isis validation error because of optional property on Isis 1.8.0
Posted by Erik de Hair <e....@pocos.nl>.
On 08/28/2015 07:00 PM, Dan Haywood wrote:
> 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?
Thanks, that helped.
>
> 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).
Ok, I'll keep that in mind.
Erik
>
> HTH
> Dan
>
>
>
> On 28 August 2015 at 16:39, Erik de Hair <e....@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
>>
>>
>>
Re: Isis validation error because of optional property on Isis 1.8.0
Posted by Dan Haywood <da...@haywood-associates.co.uk>.
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....@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
>
>
>