GORM/Grails - add extra column to a joinTable expression
问题 I have a Domain Class setup similar to this class NewsStory { String headline static hasMany = [channels:Channel] static mapping = { table 'NewsStory' addresses joinTable:[name:'Article_Channel', key:'ArticleId', column:'ChannelId'] } } in the Article_Channel table i need to have an extra column populated called ArticleType say. Its value will always be the same e.g. 'news' for this domain class, but will be differnt for others e.g. 'blog' Channel is just something like 'Security' etc Is