Update automatic dataprovider hot reloading to support views

This commit is contained in:
Andrew Kingston 2023-08-24 16:20:32 +01:00
parent d109411ed8
commit 8269ecf237
2 changed files with 2 additions and 2 deletions

View File

@ -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",

View File

@ -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