[
https://issues.apache.org/jira/browse/JDO-403?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12509756
]
Andy Jefferson commented on JDO-403:
------------------------------------
I thought I had already explained why @Table, @SecondaryTable, @JoinTable are
required (comment on 22/Jun on this JIRA). To reiterate where they are proposed
to be used
<class name="MyClass" table="MY_TABLE">
equates to
@PersistenceCapable
@Table(table="MY_TABLE")
<field name="myCollection" table="MY_JOIN_TBL">
equates to
@Field
@JoinTable(table="MY_JOIN_TBL")
<field name="myFld" table="MY_SEC_TBL">
equates to
@Field
@SecondaryTable(table="MY_SEC_TBL")
While we could put elements "table", "catalog", "schema" into @Field the above
annotation is far clearer IMHO, it separates ORM from JDO, and it aligns this
part of JDO annotations with JPA (which I thought was a goal of JDO2.1)
As you say, you only have the "table" under <field> so this implies that any
join or secondary table is in the same catalog/schema as the owning table. With
these annotations the user can actually specify where the join/secondary table
is stored.
> JDO2 Annotations
> ----------------
>
> Key: JDO-403
> URL: https://issues.apache.org/jira/browse/JDO-403
> Project: JDO
> Issue Type: New Feature
> Components: api2
> Affects Versions: JDO 2 final
> Reporter: Andy Jefferson
> Assignee: Michelle Caisse
> Fix For: JDO 2 maintenance release 1
>
> Attachments: embedded.patch, fkpk.patch, jdo_2_1_annotations.jar
>
>
> It would be desirable for JDO2 to have its own set of annotations. We have
> developed a set within JPOX that would likely serve as a starting point for
> such a set. In my opinion they should be
> 1. Split into javax.jdo.annotations.jdo and javax.jdo.annotations.orm
> 2. Move ORM attributes from some of the JDO annotations and have a ORM
> annotation.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.