grails / gorm-hibernate5

GORM for Hibernate 5
Apache License 2.0
62 stars 68 forks source link

docs - multi-datasource config inconsistency #25

Open zyro23 opened 7 years ago

zyro23 commented 7 years ago

configuring two dataSources,

indicate that the correct format is:

dataSources:
    dataSource:
        # primary dataSource config ("dataSource")
    secondary:
        # secondary dataSource config ("dataSource_secondary")
graemerocher commented 7 years ago

the former is correct. pull requests welcome

zyro23 commented 7 years ago

just making sure i get that one right - by "former is correct" you mean

dataSources:
    dataSource:
        # primary dataSource config ("dataSource")
    secondary:
        # secondary dataSource config ("dataSource_secondary")

and the pull request should update the gorm-hibernate5 docs reflecting that format?

graemerocher commented 7 years ago

No.

dataSource:
    # primary dataSource config ("dataSource")
dataSources:
    secondary:
        # secondary dataSource config ("dataSource_secondary")

Is correct. Since typically you have a single default data source and multiple other data sources that inherit settings from the default.

zyro23 commented 7 years ago

just a quick note that this is still on the radar, however i am currently using the "legacy" syntax succesfully with gorm-6.1.1 and that is the only working one, at least until https://github.com/grails-plugins/grails-database-migration/commit/754ad2fb7fdc41160258807695b0f4d80cf16577 is released.