Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to use generated scaffolding causes error #16

Open
gkrasnow opened this issue Dec 12, 2012 · 0 comments
Open

Trying to use generated scaffolding causes error #16

gkrasnow opened this issue Dec 12, 2012 · 0 comments

Comments

@gkrasnow
Copy link

| Error 2012-12-11 17:58:19,705 [http-bio-8090-exec-10] ERROR mongodb.MongoDomainClass - Could not get instance from DB
Message: invalid ObjectId [null]
Line | Method
->> 128 | in org.bson.types.ObjectId


| 122 | in ''
| 554 | _checkedId . . . in grails.plugins.mongodb.MongoPluginSupport
| 240 | doCall in grails.plugins.mongodb.MongoPluginSupport$_addStaticMethods_closure13
| 34 | show . . . . . . in mongotest.DummyBController
| 195 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter . . . . in grails.plugin.cache.web.filter.AbstractFilter
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 886 | runTask . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 680 | run . . . . . . in java.lang.Thread

package mongotest

import com.google.code.morphia.annotations.Entity
import grails.plugins.mongodb.ast.TransformationConfiguration

@Entity
@TransformationConfiguration(injectId = true, injectVersion = true)
class DummyB {
    transient mongo // spring bean, dependency injection

    String b
    Date dateCreated
    Date lastUpdated

    static constraints = {
        b nullable: false
    }

    def validate() {
        return true;
    }

    String toString() {
        'DummyB: ' + id + '::' + b
    }
}

There is a dummy validate() function to work around the previous issue I submitted where the validate() function is not found on the domain objects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant