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

StackOverflowError with unbind #5

Open
greenlaw110 opened this issue Dec 5, 2010 · 0 comments
Open

StackOverflowError with unbind #5

greenlaw110 opened this issue Dec 5, 2010 · 0 comments

Comments

@greenlaw110
Copy link
Collaborator

If you have controller method signature use ObjectId as parameter type, then you will probably end up with a StackOverflowError with unbind method. This is a limitation of Play framework. See http://groups.google.com/group/play-framework/browse_thread/thread/8fa3cbd25b635ed3/542eee6d20a73d53?lnk=gst&q=unbind+stackOverflowError#542eee6d20a73d53.

Workaround is to use String in place where you want to use ObjectId, like the following:

public static void form(String id) {
    if(id != null) {
        Post post = Post.findById(new ObjectId(id));
        render(post);
    }
    render();
}
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