isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Haywood <>
Subject Re: Using a custom value type with @Version still supported?
Date Tue, 14 Mar 2017 06:16:06 GMT
Hi Kevin,

Um, no, as you have probably surmized, @Value is not currently supported.

There are two reasons:
1. for the Wicket viewer, a custom component would need to be developed to
render the value by some means or other
2. for DataNucleus, an implementation of its JavaMapping is required [1,2,3]
3. the field may need additional DN annotations when in the domain model [4]

All of this makes our @Value annotation pretty redundant.  (There might,
still, be one part of Isis that has a vestigial dependency on the value
semantics facets; I could look up the details to double check if you want
to pursue).





On Tue, 14 Mar 2017 at 02:50 <> wrote:


Is @Value(semanticsProviderClass=...) still supported?

I have a "Location" value semantics provider that represents a Location
as 3 integers ("x;y;z"), but it does not seem to be used as I expect.

Do I need to do anything special, other than have the provider declared?

@Value(semanticsProviderClass = LocationSemanticsProvider.class)
public class Location implements Serializable {

After adding a "Location" property to the SimpleObject generated from
the archetype I don't see it being picked up and used by DataNucleus...

@javax.jdo.annotations.Column(allowsNull = "true", length = 40)
@Property(editing = Editing.ENABLED)
@Setter @Getter
Location location;

The to/from string methods of the LocationSemanticsProvider are being
called, but the property is not being persisted...

There is no corresponding column in the created table..

20:38:32,414  [Schema               main       DEBUG]  CREATE TABLE
     "map" VARCHAR(255) NULL,
     "name" VARCHAR(40) NOT NULL,
     "notes" VARCHAR(4000) NULL,
     "version" TIMESTAMP NOT NULL,
     CONSTRAINT "SimpleObject_PK" PRIMARY KEY ("id")


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