File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Groovy and the fly likes Grails one-to-many in one direction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Grails one-to-many in one direction" Watch "Grails one-to-many in one direction" New topic

Grails one-to-many in one direction

J Solomon
Ranch Hand

Joined: Oct 08, 2012
Posts: 30
New to grails here and I'm looking to model a one-to-many relationship, but I only want creates and updates to work in one direction.

So what I'm looking for is when I create a new environment, I don't want to be able to add PropertiesFiles to it, since you cannot have a properties file without first having an Environment (kinda like the whole chicken and egg thing). When I create a new Properties file, you should have to associate it with a pre-existing Environment. I hope this makes sense. Thanks for the help in advance.

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15302

This is not something that you control with your Domain relationships. This is something you control with business logic in your Controller/Service as well your views.

GenRocket - Experts at Building Test Data
I agree. Here's the link:
subject: Grails one-to-many in one direction
It's not a secret anymore!