xpusostomos opened a new issue, #14430: URL: https://github.com/apache/grails-core/issues/14430
The auto-generated data model from grails / gorm creates referential integrity constraints... good. However when you use the joinTable: clause, it doesn't create constraints. An example of this is the grails async mail plugin: https://github.com/kefirfromperm/grails-asynchronous-mail This creates the following tables: ASYNC_MAIL_MESS ASYNC_MAIL_ATTACHMENT ASYNC_MAIL_CC ASYNC_MAIL_BCC ASYNC_MAIL_TO ASYNC_MAIL_HEADER Only ASYNC_MAIL_ATTACHMENT has referential integrity with regards to ASYNC_MAIL_MESS, and that's because it uses a separate class for AsynchronousMailAttachment rather than the joinTable construct. All the other tables have no integrity. By implication, options like cascade: 'all-delete-orphan' and so forth should also be allowed. ### Task List Run the async mail plugin Observe the auto-generated tables as listed above have no referential integrity. ### Expected Behaviour I see no reason that joinTable shouldn't generate integrity like the rest of gorm. ### Actual Behaviour No referential integrity. ### Environment Information - **Grails Version:** 4.0.9 - **JDK Version:** 1.8 ### Example Application https://github.com/kefirfromperm/grails-asynchronous-mail -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
