Repository navigation
Autodetect spring.jpa.database from spring.datasource.url - #7796
eddumelendez wants to merge 1 commit into
Conversation
|
Gah Eddu, you beat me to it. Thanks! |
There was a problem hiding this comment.
How do you feel about retrieving the URL of the DataSource from the meta-data (like you did in that other PR). This avoid injecting another collaborator and would work for things where the url isn't defined (that's typically the case for auto-configured embedded databases).
There was a problem hiding this comment.
You should move that up and back-off if the DatabaseDriver is UNKNOWN.
Also, we need a better link between Database and DatabaseDriver. when I gave some thought to that issue, I was considering creating a mapping between a DatabaseDriver and a Database. I think it's better than relying on the fact they share the same name...
We probably need a test that iterates over Database values to make sure everything is covered somehow.
There was a problem hiding this comment.
Ah crap, ok. Now I get the name thing (I should have read everything)
I am not sure (yet) that we should add yet another attribute to that thing. Such soft link is not very interesting anyway. And there's only one user of it so I'd keep that mapping where the Database is determined.
|
@snicoll working on changes. Thanks for feedback |
4c20ff5 to
d96a300
Compare
Previously, property `spring.jpa.database` should be provided. This commit allows to detect the database when `spring.datasource.url` is provided. See spring-projectsgh-7708
d96a300 to
24866d7
Compare
* pr/7796: Polish contribution Autodetect spring.jpa.database from spring.datasource.url
|
I did polish it a bit more, thanks Eddu! |
Previously, property
spring.jpa.databaseshould be provided. Thiscommit allows to detect the database when
spring.datasource.urlisprovided.
See gh-7708