Where would you store the per instance metadata? In the entitystore? In an associated MetaData entity thats referencing the entity or the association? MetaData per Entity instance would be cool as this would allow per isntance configuration or helping resolving data dependend security concerns. One question about the metadata is if it is persistent (see above) or just transient information (like adding intermediary information to an order during the order process which is discarded after the process is complete).
Regarding Qualifiers: I'd also go for qualifier as (Association)Role is misleading if you call the additional data also roles. Then the container containing the role and the role itself have the same name. May there be a mental mixup with QualifiedIdentities for the users? Under the hood its not the same as a map association as (imho) you don't have just a Map<Role,Entity> but rather a Collection<Qualifier<Role,Entity>> perhaps even a Set. So the same role can appear multiple times but then has to be associated with different entities? Correct me if I'm not right. Michael Niclas Hedhman schrieb: > On Tue, Sep 9, 2008 at 12:30 PM, Rickard Öberg <[EMAIL PROTECTED]> wrote: >> Niklas Uhrberg wrote: >>> And this metadata is per instance and not per type? >>> >>> (This round of the discussion started by me asking Rickard about the >>> possibility of using the metadata on associations, but as this is per >>> type and not per instance it called for more support.) >>> >>> I'm still pretty ignorant about all mechanisms in Qi4J... >> There is per-type metadata for entitytypes, property types, etc., but >> nothing per instance. If such thing is wanted I would suggest to do it >> as a mixin type that you apply to the domain model. > > Last time we really discussed this, we were still on the page of "per > instance" meta data for Entities, but since that never got > implemented, I guess what we indeed have is "per type". > > Well, IF we have "per instance" meta data for entities (which to me > sounds like a good idea, albeit could maybe be hard to implement), > then I think it is natural that the Associations also have "per > instance" meta data. > > Cheers > Niclas > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

