I'm new to Groovy/Grails so this could be an easy question. I have the feeling this is common code but I've spent a while and I can't find the right thing to Google.
I have a domain structure with several many to many relationships ( indicated by <--> )
Worker <--> Assembly Line <--> Part
The trick is that there are also 2 different one to many relationships on the same class...
Worker -> Inspection Part -> Inspection
A part can be inspected many times, but there always has to be a person who does the inspection.
I'm in the Assembly Line controller and and I can do AssemblyLine.get(id) easy enough, but that will give me all inspections for the parts in that line. I only want the inspection for the worker that I pulled from the session.
Is there an easy way to do this that I'm missing? It feels like there should be.