Specifying PK On Query with a Join | trent | 2011-08-24 17:02 |
Status: Closed | ||
Anyone know how do I specify a PK when my query has a join (or if its possible)? Im generally use the LABKEY.DataRegion object to get the selected items, but when there's a join, no column is marked as a PK, so just returns an empty set of strings as the checked items. LABKEY.DataRegions[wp.dataRegionName].getChecked() https://www.labkey.org/download/schema-docs/xml-schemas/schemas/tableInfo_xsd/schema-summary.html : <xs:element minOccurs="0" name="pkColumnName" type="xs:string"> <xs:annotation> <xs:documentation> A comma-separated ordered list of the column name values that comprise the primary key of the table. Used for list export/import. </xs:documentation> </xs:annotation> </xs:element> https://www.labkey.org/download/schema-docs/xml-schemas/schemas/tableInfo_xsd/elements/pkColumnName.html XML Representation Summary <dat:pkColumnName Content: { xs:string } </dat:pkColumnName> So I tried adding to my metadata xml: <ns:tables xmlns:ns="http://labkey.org/data/xml"> <ns:table tableName="test1" tableDbType="NOT_IN_DB"> <ns:columns> <ns:column columnName="specimen_id"> <ns:description>blabla</ns:description> </ns:column> </ns:columns> <ns:pkColumnName> list_id </ns:pkColumnName> </ns:table> </ns:tables> Is my syntax fail? (It doesn't mark that col as PK) |
||