Commit f326508
committed
Merge customProperties/clientInfo/initSql when loading config from multiple places
When a config is loaded with loadSettings from different places, the
behaviour of customProperties/clientInfo/initSql is not consistent
setDefaults did not honor clientInfo / initSql at all.
multiple loadSettings should merge customProps/clientInfo/initSql
Old behaviour:
- initSql is always overwritten
- customProps are overwritten, if value is present in config
(even if it was empty)
- clientInfo is only overwrtitten when configured in properties
New behaviour:
- all of them are merged. So multiple loadSettings will append initSql
or put all props to clientInfo/customProps
btw: initSql also supports "delimiter $$"1 parent 2f3083b commit f326508
File tree
2 files changed
+86
-23
lines changed- ebean-datasource-api/src
- main/java/io/ebean/datasource
- test/java/io/ebean/datasource
2 files changed
+86
-23
lines changedLines changed: 39 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
197 | | - | |
| 197 | + | |
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
201 | 214 | | |
202 | 215 | | |
203 | 216 | | |
| |||
809 | 822 | | |
810 | 823 | | |
811 | 824 | | |
812 | | - | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
813 | 832 | | |
814 | 833 | | |
815 | 834 | | |
816 | 835 | | |
817 | | - | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
818 | 840 | | |
819 | 841 | | |
820 | 842 | | |
821 | | - | |
822 | | - | |
| 843 | + | |
823 | 844 | | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | 845 | | |
| 846 | + | |
828 | 847 | | |
829 | 848 | | |
830 | 849 | | |
831 | | - | |
832 | | - | |
| 850 | + | |
833 | 851 | | |
834 | | - | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
835 | 858 | | |
836 | 859 | | |
837 | 860 | | |
838 | | - | |
| 861 | + | |
839 | 862 | | |
840 | 863 | | |
841 | 864 | | |
842 | | - | |
843 | 865 | | |
844 | 866 | | |
845 | | - | |
846 | | - | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
847 | 870 | | |
848 | 871 | | |
849 | 872 | | |
850 | 873 | | |
851 | | - | |
| 874 | + | |
852 | 875 | | |
853 | 876 | | |
854 | | - | |
855 | 877 | | |
856 | 878 | | |
857 | 879 | | |
| |||
Lines changed: 47 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | 12 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
46 | 87 | | |
47 | 88 | | |
48 | 89 | | |
| |||
79 | 120 | | |
80 | 121 | | |
81 | 122 | | |
82 | | - | |
83 | | - | |
84 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
85 | 126 | | |
86 | 127 | | |
87 | 128 | | |
| |||
95 | 136 | | |
96 | 137 | | |
97 | 138 | | |
98 | | - | |
99 | | - | |
| 139 | + | |
| 140 | + | |
100 | 141 | | |
101 | 142 | | |
102 | 143 | | |
| |||
0 commit comments