grails « Composite « JPA Q&A





1. grails: quering in a composite structure    stackoverflow.com

hey
i have the following domain model:

class Location {
    String name

    static hasMany = [locations:Location, persons:Person]
}

class Person {
    String name
}
so basically each location ...

2. Using a composite key in GORM    stackoverflow.com

In section 5.5.2.5 of the grails document it says

GORM supports the concept of composite identifiers (identifiers composed from 2 or more properties). It is ...

3. Grails syntax for joining tables on composite foreign key    stackoverflow.com

Could anyone please tell me how to join tables in Grails? I need help with the syntax. Let's say I have three tables and they don't have any explicitly defined foreign key ...

4. Grails - composite key class usage    stackoverflow.com

I've recently changed some mapping in my app and now it looks like this. Scenario - many-to-many - Subscription Composite key class -> ScenarioSubscription

class ScenarioSubscription {

int id
Scenario scenario
Subscription subscription}
Works fine for me. But ...

5. GORM composite key based on start and end dates    stackoverflow.com

I want to have a table, where I want to have entries, which are date ranged. How I normally did it, was to have a table with: someId [not unique] startDate endDate These three would create ...