Hi guys,
I'm trying to define a custom value type, Location, similar to the gmap
example, but working only with integer values (to specify a position on a
floor plan), but I'm having issues getting the resulting value to work
with JDO.
I have:
{code}
@Value(semanticsProviderClass = BlueprintLocationSemanticsProvider.class)
public class BlueprintLocation implements Serializable {
{code}
with just two fields: and X and a Y..
where
{code}
public class BlueprintLocationSemanticsProvider implements
ValueSemanticsProvider<BlueprintLocation> {
{code}
But the JDO introspection does not pick up the property:
On my SimpleObject:
{code}
private BlueprintLocation blueprintLocation;
@javax.jdo.annotations.Column(allowsNull="true")
public BlueprintLocation getLocation() {
return blueprintLocation;
}
public void setLocation(BlueprintLocation location) {
this.blueprintLocation = location;
}
{code}
In the log:
17:52:38,921 [Schema main DEBUG] CREATE TABLE
"SimpleObject"
(
"id" BIGINT GENERATED BY DEFAULT AS IDENTITY,
"blueprint_id_OID" BIGINT NULL,
"name" NVARCHAR(255) NOT NULL,
"plan_id_OID" BIGINT NULL,
"attachment_name" NVARCHAR(255) NULL,
"attachment_mimetype" NVARCHAR(255) NULL,
"attachment_chars" CLOB NULL,
"version" BIGINT NOT NULL,
"friends_id_OID" BIGINT NULL,
"friends_INTEGER_IDX" INTEGER NULL,
CONSTRAINT "SimpleObject_PK" PRIMARY KEY ("id")
)
If I annotate BlueprintLocation with @PersistenceCapable, JDO treats it as
an entity. Using @PersistenceAware has no effect.
What am I missing?
(Does the ToDo app show an example ValueType? I have not checked...)
Thanks,
Kevin