Announcement Announcement Module
No announcement yet.
Pluralization error Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I started to play with roo this week, so far really impressed.
    Thanks for this great piece of software.

    I faced a problem with plural, and as this thread is about that, I am posting it here.

    I have an entity class called Corpus, plural is Corpora.
    Issue #1:
    When I generate entity Corpus with fields, finder list gives:
    findCorpusesByName, etc.
    Ok, I read this thread and added RooPlural("Corpora") annotation by hand in and Roo shell picked it up, so I was able to add finder findCorporaByName.
    The problem is my log.roo script cannot be executed at once, since initially I cannot add finder findCorporaByName.
    It would be good, if one could specify plural inside entity command, something like: entity --class x.y.z.Corpus --plural Corpora, so correct spelled finders are automatically generated.

    Issue #2:
    If I had executed contoller all, before I added RooPlural, does not pick up the change, namely, it remains:

    @RequestMapping(params = "form", method = RequestMethod.GET)
    public String CorpusController.createForm(ModelMap modelMap) {
    modelMap.addAttribute("corpus", new Corpus());
    return "corpuses/create";

    So, I deleted complete controller package and src/main/webapp, executed controller all again and now I see coprora instead of corpuses in my CorpusController.

    I guess this is not so important but wanted to report anyway.

    thanks again & best,


    • #17
      Following entity results in the plural error when trying to create a controller.
      Could not determine plural for 'MyObject'

      public class MyObject {
          private Integer abc;
      First of all it would be nice if the error message would give you the name of the field which is preventing it from creating the controller.

      The plural problem is caused by the @Min annotation with the negative value. Is the annotation like this incorrect or is this a bug?