On Mon, May 5, 2008 at 8:18 PM, Peter Neubauer <[EMAIL PROTECTED]> wrote:
> import org.qi4j.entity.association.Association;
> import org.qi4j.library.auth.User;
> import org.qi4j.library.framework.constraint.annotation.NotNull;
> import org.qi4j.property.Property;
> public interface Issue {
> @NotNull Property<Position> position();
> @NotNull Association<User> user();
> }
>
> What is the difference here, is there any preference in how to module
> the relation between Issue, Position and User?
Property should be used for Value Objects and Associations for
references to Entity instances.
In reality, this is actually a bit more complicated and we are still
pondering over one particular feature of Association, not yet
implemented, and that is that for Property one can provide metaInfo
which will be the same for ALL instances, but for Association we want
to allow metaData per association instance (compare that with the
attributes for relations in Neo).
Also, at the moment the Association requires a EntityComposite, but
that kind of breaks the domain model isolation of such implementation
detail, and should probably be changed asap.
Cheers
Niclas
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev