Skip to content

Entity Properties

homedirectory edited this page May 21, 2024 · 3 revisions

Entity Properties

Key

Composite Key

Composite key -- property key with type DynamicEntityKey. Its nature is that of a calculated property. Its value is a concatenation of values of all key member properties.

One-to-one Association Properties

Property P declared by entity E represents a one-to-one association if:

  • P is of an entity type PE.
  • PE has key type K and K <= E (in terms of subtyping) and (K is persistent or synthetic-based-on-persistent).

Example:

class Vehicle extends AbstractPersistentEntity<String> {
  // one-to-one association
  @IsProperty VehicleDetails details;
}

class VehicleDetails extends AbstractPersistentEntity<Vehicle> {
  @IsProperty Vehicle key;
}

Such properties are implicitly calculated. In the example above, the value of Vehicle.details for any given Vehicle v will be calculated to find the VehicleDetails associated with v, if such an association indeed exists.

See also

Clone this wiki locally