db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilan Kirsh <ki...@objectdb.com>
Subject Re: JDO2 annotations : split between JDO and ORM
Date Sun, 15 Oct 2006 16:15:11 GMT
> Hi Ilan,
>
>> I agree that mappedBy should remain in Field. Same is true for indexed,
>> unique, deleteAction, sequence and valueStrategy, which can all  be
>> useful also for object databases. I think that only table, column and
>> columns are specific for relational databases. Same is applied also for
>> Element, Key and Value, which were moved to orm.
>
> Thanks. I wasn't aware of whether you would use those concepts so just 
> moved
> everything :-)

indexed and unique are certainly being used - also in Element, Key
and Value. I do not use deleteAction, sequence and valueStrategy
yet, but I think that it might make sense to use them in the future.

>> I am not sure how a composite index should be declared using
>> annotations. Assuming that this is done using index and unique -
>> these two are also relevant to object databases.
>
> Presumably in MetaData you would do this ?
> <class ...>
>    <index name="...">
>        <field name="a"/>
>        <field name="b"/>
>    </index>
> </class>

Yes, this way exactly.

> so I would guess that we should allow something like
> @Index (fields={"a", "b"})
>
> i.e add a fields array element onto Index (same for Unique).
> We also need to add an @Indices annotation to allow for multiple indices 
> per
> class - same for unique.
>
> -- 
> Andy

That looks good except that personally I prefer @indexes over @indices.
I just found an interesting discussion about this issue, at:
    http://fraserspeirs.livejournal.com/1000062.html
Maybe both can be supported but because this is your work, I assume you
have the privilege to choose your favorite form :-)

Regards,

Ilan



Mime
View raw message