Update automatic dataprovider hot reloading to support views
This commit is contained in:
parent
d109411ed8
commit
8269ecf237
|
@ -657,7 +657,7 @@ export const getEventContextBindings = (
|
||||||
* @return {{schema: Object, table: Object}}
|
* @return {{schema: Object, table: Object}}
|
||||||
*/
|
*/
|
||||||
export const getSchemaForDatasourcePlus = (resourceId, options) => {
|
export const getSchemaForDatasourcePlus = (resourceId, options) => {
|
||||||
const isViewV2 = resourceId?.includes("view_ta_")
|
const isViewV2 = resourceId?.includes("view_")
|
||||||
const datasource = isViewV2
|
const datasource = isViewV2
|
||||||
? {
|
? {
|
||||||
type: "viewV2",
|
type: "viewV2",
|
||||||
|
|
|
@ -81,7 +81,7 @@ export const createDataSourceStore = () => {
|
||||||
|
|
||||||
// Fetch related table IDs from table schema
|
// Fetch related table IDs from table schema
|
||||||
let schema
|
let schema
|
||||||
if (options.invalidateRelationships) {
|
if (options.invalidateRelationships && !dataSourceId?.includes("view_")) {
|
||||||
try {
|
try {
|
||||||
const definition = await API.fetchTableDefinition(dataSourceId)
|
const definition = await API.fetchTableDefinition(dataSourceId)
|
||||||
schema = definition?.schema
|
schema = definition?.schema
|
||||||
|
|
Loading…
Reference in New Issue