Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-2742

Allow meta-annotations to be declared for entities.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0-M5
    • 2.0.0-M6
    • Core
    • None

    Description

      for example, would like to be able to declare:

      @Target(TYPE)
      @Retention(RUNTIME)
      @PersistenceCapable( identityType = IdentityType.DATASTORE)
      @DatastoreIdentity( strategy = IdGeneratorStrategy.NATIVE)
      @Version( strategy = VersionStrategy.VERSION_NUMBER)
      public @interface EntityWithIdAndVersion {
      
          @AliasFor( annotation = PersistenceCapable.class, attribute = "schema")
          String schema() default "";
      
          @AliasFor( annotation = DatastoreIdentity.class, attribute = "column")
          String idColumn() default "id";
      
          @AliasFor( annotation = Version.class, attribute = "column")
          String versionColumn() default "version";
      
      } 

      and then:

       @EntityWithIdAndVersion( schema = "ORGANISATION")
      public class Party {}

      however, this results in:

      "ObjectSpecification is missing an EntityFacet" exception.

      Attachments

        Activity

          People

            hobrom Andi Huber
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: