Announcement Announcement Module
Collapse
No announcement yet.
Finder on a calculate field Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Finder on a calculate field

    Hi there,

    I wonder if the following is possible:

    I need a finder using an entity calculated field. The field is defined as transient to avoid been persisted.

    It tried finder list <entity> and the first time I got a finderName string but the sql statement didn't work on runtime. I tried again from scratch and finder list command is providing names adding "- failure" to the ones involving the calculated field only.

    So, I am not sure what is not working for me
    Thx in advance

  • #2
    You will need to write custom Java code to filter the results of a broader query, or a JPQL query that includes the calculation.

    Roo finders generate JPQL, and JPQL can work only with persistent fields.

    HTH
    Rod

    Comment


    • #3
      Getting the most of Roo finders

      Thank you Rod.

      What about finders on the following scenario...

      Entity Person associated with Entity Address: I need a finder(s) that allow me to search against Person/Address attributes.

      Could I get them with Roo finders of I have to go custom.

      Thx again

      Comment


      • #4
        You will need to write a JPA QL expression in a custom finder.

        Comment

        Working...
        X