[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig L Russell updated JDO-764: Attachment: (was: jdo-764.patch) > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson >Priority: Major > Fix For: JDO 3.2 > > Attachments: duplicate-annotations.txt, jdo764.patch > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > public @interface DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > public @interface MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig L Russell updated JDO-764: Attachment: jdo764.patch This patch adds a meta-annotation to the pc/companyAnnotatedFC classes > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson >Priority: Major > Fix For: JDO 3.2 > > Attachments: duplicate-annotations.txt, jdo764.patch > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > public @interface DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > public @interface MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig L Russell updated JDO-764: Attachment: duplicate-annotations.txt This patch adds a test for duplicate PersistenceCapable annotations. > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > Attachments: duplicate-annotations.txt, jdo-764.patch > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > public @interface DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > public @interface MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig L Russell updated JDO-764: Attachment: jdo-764.patch With this patch, and DataNucleus 5.1.1-SNAPSHOT of 21-July-2017, enhancement works but there are failures running tck tests: Insert of object "org.apache.jdo.tck.pc.companyAnnotatedFC.FCDSMedicalInsurance@5553d0f5" using statement "INSERT INTO DATASTOREIDENTITY0.FCDSINSURANCE (CARRIER,EMPLOYEE,INSID,PLANTYPE,DISCRIMINATOR) VALUES (?,?,?,?,?)" failed : Table/View 'DATASTOREIDENTITY0.FCDSINSURANCE' does not exist. org.datanucleus.exceptions.NucleusDataStoreException: Insert of object "org.apache.jdo.tck.pc.companyAnnotatedFC.FCDSMedicalInsurance@5553d0f5" using statement "INSERT INTO DATASTOREIDENTITY0.FCDSINSURANCE (CARRIER,EMPLOYEE,INSID,PLANTYPE,DISCRIMINATOR) VALUES (?,?,?,?,?)" failed : Table/View 'DATASTOREIDENTITY0.FCDSINSURANCE' does not exist. > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > Attachments: jdo-764.patch > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > public @interface DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > public @interface MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig L Russell updated JDO-764: Attachment: (was: jdo-764.patch) > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > public @interface DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > public @interface MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig L Russell updated JDO-764: Attachment: (was: JDO-764.patch) > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > Attachments: jdo-764.patch > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > public @interface DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > public @interface MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig L Russell updated JDO-764: Attachment: jdo-764.patch This patch applies the composite annotation @DatastoreIdDiscriminatorClassNameInheritanceNew to many of the classes in companyAnnotatedFC. > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > Attachments: jdo-764.patch, jdo-764.patch, JDO-764.patch > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > public @interface DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > public @interface MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Craig L Russell updated JDO-764: Attachment: jdo-764.patch > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > Attachments: jdo-764.patch, JDO-764.patch > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > public @interface DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > public @interface MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andy Jefferson updated JDO-764: --- Description: By default annotations are used directly in a persistable class. Java additionally allows annotations to be formed of other annotations. This is particularly useful where a user has a particular combination of annotations to set on a class/field/method and wants to simply annotate with an abbreviated form. For example, specifying attributes of an annotation @PersistenceCapable(detachable="true", identityType="datastore", embeddedOnly="true") or formed of multiple annotations @PersistenceCapable(detachable="true") @Extension(vendorName="datanucleus", key="multitenancy-column-name", value="TENANT") These can be represented as meta-annotations like this @Target(TYPE) @Retention(RUNTIME) @PersistenceCapable(detachable="true", identityType="datastore", embeddedOnly="true") public @interface DatastoreIdPersistable { } @Target(TYPE) @Retention(RUNTIME) @PersistenceCapable(detachable="true") @Extension(vendorName="datanucleus", key="multitenancy-column-name", value="TENANT") public @interface MultitenantPersistable { } and the user can subsequently just annotate their persistable class as @DatastoreIdPersistable public class MyClass1 {...} @MultitenantPersistable public class MyClass2 {...} The work required to support this in the JDO spec is simply to update the following annotations to add @Target({ElementType.ANNOTATION_TYPE}) The annotations requiring this are @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, @Serialized, @Transactional, and @Value (all other annotations already have @Target({ElementType.TYPE}) which already permits their usage in meta-annotations. The same is proposed for JPA 2.2, see https://github.com/javaee/jpa-spec/issues/43 was: By default annotations are used directly in a persistable class. Java additionally allows annotations to be formed of other annotations. This is particularly useful where a user has a particular combination of annotations to set on a class/field/method and wants to simply annotate with an abbreviated form. For example, specifying attributes of an annotation @PersistenceCapable(detachable="true", identityType="datastore", embeddedOnly="true") or formed of multiple annotations @PersistenceCapable(detachable="true") @Extension(vendorName="datanucleus", key="multitenancy-column-name", value="TENANT") These can be represented as meta-annotations like this @Target(TYPE) @Retention(RUNTIME) @PersistenceCapable(detachable="true", identityType="datastore", embeddedOnly="true") @interface @DatastoreIdPersistable { } @Target(TYPE) @Retention(RUNTIME) @PersistenceCapable(detachable="true") @Extension(vendorName="datanucleus", key="multitenancy-column-name", value="TENANT") @interface @MultitenantPersistable { } and the user can subsequently just annotate their persistable class as @DatastoreIdPersistable public class MyClass1 {...} @MultitenantPersistable public class MyClass2 {...} The work required to support this in the JDO spec is simply to update the following annotations to add @Target({ElementType.ANNOTATION_TYPE}) The annotations requiring this are @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, @Serialized, @Transactional, and @Value (all other annotations already have @Target({ElementType.TYPE}) which already permits their usage in meta-annotations. The same is proposed for JPA 2.2, see https://github.com/javaee/jpa-spec/issues/43 > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > Attachments: JDO-764.patch > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > public @interface DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andy Jefferson updated JDO-764: --- Attachment: JDO-764.patch Patch providing the extra annotation config to allow use as meta-annotations > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > Attachments: JDO-764.patch > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > @interface @DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > @interface @MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Bouschen updated JDO-764: - Component/s: specification > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > @interface @DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > @interface @MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Bouschen updated JDO-764: - Affects Version/s: JDO 3.1 > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api, specification >Affects Versions: JDO 3.1 >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > @interface @DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > @interface @MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Updated] (JDO-764) Allow JDO annotations to be used in meta-annotations
[ https://issues.apache.org/jira/browse/JDO-764?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Bouschen updated JDO-764: - Fix Version/s: JDO 3.2 > Allow JDO annotations to be used in meta-annotations > > > Key: JDO-764 > URL: https://issues.apache.org/jira/browse/JDO-764 > Project: JDO > Issue Type: Improvement > Components: api >Reporter: Andy Jefferson > Fix For: JDO 3.2 > > > By default annotations are used directly in a persistable class. Java > additionally allows annotations to be formed of other annotations. This is > particularly useful where a user has a particular combination of annotations > to set on a class/field/method and wants to simply annotate with an > abbreviated form. For example, specifying attributes of an annotation > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > or formed of multiple annotations > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > These can be represented as meta-annotations like this > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true", identityType="datastore", > embeddedOnly="true") > @interface @DatastoreIdPersistable > { > } > @Target(TYPE) > @Retention(RUNTIME) > @PersistenceCapable(detachable="true") > @Extension(vendorName="datanucleus", key="multitenancy-column-name", > value="TENANT") > @interface @MultitenantPersistable > { > } > and the user can subsequently just annotate their persistable class as > @DatastoreIdPersistable > public class MyClass1 {...} > @MultitenantPersistable > public class MyClass2 {...} > The work required to support this in the JDO spec is simply to update the > following annotations to add @Target({ElementType.ANNOTATION_TYPE}) > The annotations requiring this are > @Element, @EmbeddedId, @Key, @NotPersistent, @Order, @Persistent, > @Serialized, @Transactional, and @Value (all other annotations already have > @Target({ElementType.TYPE}) which already permits their usage in > meta-annotations. > The same is proposed for JPA 2.2, see > https://github.com/javaee/jpa-spec/issues/43 -- This message was sent by Atlassian JIRA (v6.3.15#6346)