Announcement Announcement Module
Collapse
No announcement yet.
Can't create Entity 'Author' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    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.

    Comment

    Working...
    X