I'm new to Grails and GORM and I try to implement a "One to Many" relationship. I tried the example in the doc :
class Book {
String title
}
class Author {
static hasMany = [books: Book]
String name
}
Here are the tables that are generated :
AUTHOR
- Id (PK)
- Name
BOOK
- Id (PK)
- Title
AUTHOR_BOOK
- Author_Books_Id
- Book_Id
I was expecting something more like :
AUTHOR
- Id (PK)
- Name
BOOK
- Author_Id (PK)
- Book_Index (PK)
- Title
Is there a way to achieve this (get rid of the join table) ?