Results 1 to 2 of 2

Thread: Can't create Entity 'Author'

  1. #1
    Join Date
    Jan 2005
    Location
    Zurich
    Posts
    5

    Angry Can't create Entity 'Author'

    came across a weird one. It appears that the automatic tests created for an entity won't work if the entity is called 'Author'. Honestly, it worked after renaming. Here's the commands, I used:

    entity --class Persistable --identifierColumn id --identifierType java.lang.Long --abstract --mappedSuperclass
    entity --class ~.domain.Author --extends ~.domain.Persistable --testAutomatically

    With this the aspect 'AuthorDataOnDemand_Roo_DataOnDemand' has its methods refer to the Persistable superclass rather than the Author class. E.g.:

    public Persistable AuthorDataOnDemand.getNewTransientPersistable(int index) {
    -----see: ---^
    com.mindmarket.domain.Persistable obj = new com.mindmarket.domain.Persistable();
    return obj;
    }

    It works perfectly fine with any other entity class name
    Smurve

  2. #2
    Join Date
    Dec 2005
    Posts
    929

    Default

    Apart from a typo in your reference to the Persistence entity, ie you created it in the default package but refer to it in the ~.domain package when creating Author, your script and tests pass OK for me with no issue. Attached is the project I used.
    Attached Files Attached Files
    Alan Stewart
    Spring Roo Committer
    twitter @alankstewart

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •