Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3754

Generated a repository for an entity with a String primary key identifier creates findAll that still uses NumberPath

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Done
    • Affects Version/s: 2.0.0.M2
    • Fix Version/s: 2.0.0.M3
    • Component/s: PERSISTENCE
    • Labels:
      None

      Description

      With an entity like this:

      @Id
          @GeneratedValue(strategy = GenerationType.AUTO)
          @Column(name = "id")
          private String Pizza.id;
      

      the repository that's created starts off with this:

      public Page<Pizza> PizzaRepositoryImpl.findAll(GlobalSearch globalSearch, Pageable pageable) {
              NumberPath<String> idPizza = new NumberPath<String>(String.class, "id");
              QPizza pizza = QPizza.pizza;
              JPQLQuery query = getQueryFrom(pizza); 
               .....
      

      seems like you'd want this instead:

      StringPath idSiteBadge = new StringPath("siteBadgeId");
      

        Attachments

          Activity

            People

            Assignee:
            jmvivo Jose Manuel Vivó ( Chema ) - DISID.
            Reporter:
            chrismarx chris marx
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: