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

        Miguel Ping created issue -
        Graeme Rocher made changes -
        Field Original Value New Value
        Assignee Graeme Rocher [ graemerocher ]
        Ales Smodis made changes -
        Attachment grails-1.3.5-default_grails_domain_class.patch [ 51502 ]
        Contegix Support made changes -
        Project Import Thu Mar 24 21:22:24 CDT 2011 [ 1301019744151 ]
        Graeme Rocher made changes -
        Patch attached Yes
        Fix Version/s 1.4-M1 [ 11040 ]
        Patch Submitted [Yes]
        Graeme Rocher made changes -
        Fix Version/s 1.4-M1 [ 11040 ]
        Fix Version/s 1.4-M2 [ 12504 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0-M2 [ 12805 ]
        Fix Version/s 2.0-M1 [ 12504 ]
        Burt Beckwith made changes -
        Workflow jira [ 30067 ] Grails [ 40224 ]
        Burt Beckwith made changes -
        Workflow Grails [ 40224 ] Copy of Grails [ 47657 ]
        Burt Beckwith made changes -
        Workflow Copy of Grails [ 47657 ] Grails [ 55067 ]
        Burt Beckwith made changes -
        Workflow Grails [ 55067 ] Grails2 [ 62618 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0-RC1 [ 12803 ]
        Fix Version/s 2.0-M2 [ 12805 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0.1 [ 13005 ]
        Fix Version/s 2.0-RC1 [ 12803 ]
        Burt Beckwith made changes -
        Workflow Grails2 [ 62618 ] jira [ 71172 ]
        Burt Beckwith made changes -
        Workflow jira [ 71172 ] Grails2 [ 79215 ]
        Peter Ledbrook made changes -
        Last Reviewed 01/Jan/10
        Peter Ledbrook made changes -
        Workflow Grails2 [ 79215 ] jira [ 87403 ]
        Peter Ledbrook made changes -
        Workflow jira [ 87403 ] Grails2 [ 95558 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0.2 [ 13064 ]
        Fix Version/s 2.0.1 [ 13005 ]
        James Cook made changes -
        Status Open [ 1 ] Edit [ 10000 ]
        Flagged Impediment [ 10010 ]
        Peter Ledbrook made changes -
        Status Edit [ 10000 ] Open [ 1 ]
        Peter Ledbrook made changes -
        Flagged Impediment [ 10010 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0.3 [ 13094 ]
        Fix Version/s 2.0.2 [ 13064 ]
        Graeme Rocher made changes -
        Fix Version/s 2.0.4 [ 13099 ]
        Fix Version/s 2.0.3 [ 13094 ]
        Jeff Scott Brown made changes -
        Fix Version/s 2.2 [ 13093 ]
        Fix Version/s 2.0.4 [ 13099 ]
        Graeme Rocher made changes -
        Fix Version/s 2.3 [ 13311 ]
        Fix Version/s 2.2-RC1 [ 13093 ]
        Graeme Rocher made changes -
        Fix Version/s 2.3-M2 [ 13457 ]
        Fix Version/s 2.3-M1 [ 13311 ]
        Graeme Rocher made changes -
        Fix Version/s 2.3-RC1 [ 13458 ]
        Fix Version/s 2.3-M2 [ 13457 ]
        Graeme Rocher made changes -
        Fix Version/s 2.3-RC2 [ 13482 ]
        Fix Version/s 2.3-RC1 [ 13458 ]
        Graeme Rocher made changes -
        Fix Version/s 2.3.1 [ 13502 ]
        Fix Version/s 2.3-RC2 [ 13482 ]
        Graeme Rocher made changes -
        Fix Version/s 2.3.1 [ 13502 ]

          People

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

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development