Grails
  1. Grails
  2. GRAILS-5886

Cannot mockDomain 3rd party classes that do not have a version property

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.2 final
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Patch Submitted:
      Yes
    • Patch attached:
      Yes

      Description

      If I try and mock a domain class that's being imported through hibernate, (ie not using groovy/GORM to define the class), grails will throw an error if I didn't define a version property in the hibernate mapping (either annotation or xml):

      "Version property not found, but required in domain class "

      This way it's impossible to mock domain classes that are shared with another Java projects.
      A possible solution would be allowing mappings override with a Domain***Mappings.groovy (just like we define the GORM constraints).

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Miguel Ping
          • Votes:
            10 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development