Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Enrolling more than one student for a class #5

Open
luanne opened this issue Jul 30, 2015 · 1 comment
Open

Enrolling more than one student for a class #5

luanne opened this issue Jul 30, 2015 · 1 comment

Comments

@luanne
Copy link
Contributor

luanne commented Jul 30, 2015

Enrolling any student other than the first for a class does not work. Angular code to be updated to manage enrollments.

@hjohanns
Copy link

I have an error in the same area
[ratpack-compute-1-6] ERROR ratpack.error.internal.DefaultDevelopmentErrorHandler - exception thrown for request to /api/students com.fasterxml.jackson.databind.JsonMappingException: Can not instantiate value of type [simple type, class school.domain.Enrollment] from Integral number (740); no single-int-arg constructor/factory method at [Source: io.netty.buffer.ByteBufInputStream@51342177; line: 1, column: 17] (through reference chain: school.domain.Student["enrollments"]->java.util.HashSet[0])

It seems that only the id of the class (740) is passed to the Enrollment creator, whereas it would need also the student Id. I cannot find where I should specify that as RelationshipEntity, the constructor should receive both ends. Any idea if this is the same problem that you report?
Thanks, hj

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

No branches or pull requests

2 participants