Labkey data base schema not respecting ON DELETE CASCADE if referencing a different schema !?

LabKey Support Forum
Labkey data base schema not respecting ON DELETE CASCADE if referencing a different schema !? Leo Dashevskiy  2013-07-01 11:51
Status: Closed
 
Hey, Josh, this is pretty interesting.

So this caching mechanism is turned on only for the case when a table from one schema references a table in a different schema? (Because like I mentioned, I do not see this issue, when both tables are within the same schema.)

I tried modifying my table's metadata XML file like so:

<ns:table tableName='gstbl' tableDbType='TABLE'>
        <ns:cacheSize>0</ns:cacheSize>
        <ns:description>
            The 'gsTbl' table contains information about generated gating sets.
        </ns:description>
        <ns:columns>
            <ns:column columnName='container'/>
            <ns:column columnName='gsid'/>
            <ns:column columnName='gsname'/>
            <ns:column columnName='objlink'>
                <ns:columnTitle>objLink</ns:columnTitle>
            </ns:column>
            <ns:column columnName='gsdescription'>
                <ns:columnTitle>gsDescription</ns:columnTitle>
            </ns:column>
            <ns:column columnName='xmlpath'>
                <ns:columnTitle>xmlPath</ns:columnTitle>
            </ns:column>
            <ns:column columnName='samplegroup'>
                <ns:columnTitle>sampleGroup</ns:columnTitle>
            </ns:column>
            <ns:column columnName='created'>
                <ns:columnTitle>Created</ns:columnTitle>
                <ns:formatString>yyyy-MM-dd HH:mm:ss</ns:formatString>
            </ns:column>
        </ns:columns>
    </ns:table>

Shut down the server, then fired it back up, but the issue remains.

When the row in gsTbl referenced in stats is deleted, stats table does not get updated, but instead of the "fk" name link has the "<#>", where # is the id of the deleted row from the gsTbl...

Do I need to take any additional steps?

By the way, Ben iт one of my earlier posts mentioned that "LabKey appended brackets (<>) around the values", if there "are broken lookups" -- this seems to be the situation here.

But how could I avoid such a situation? I mean, ON DELETE CASCADE properly working would automatically solve it right away...

Thanks.
-Leo