Closed danfowler closed 8 years ago
Cool. Out of interest: the resource stuff isn't part of the JTS spec, I assume? Is there something like JTS-internal references, i.e. do schemas in JTS have a name which could be used to reference them?
@pudo hmmm, that's a tricky one.
I recently added the idea of self-referencing FKs to the spec, but FKs do require that the schema lives in a DataPackage to "know" what is being referenced.
(cf. http://dataprotocols.org/json-table-schema/index.html#foreign-keys)
I'm not sure how what Dan has implemented here works with that.
@danfowler you might want to revisit the spec here, and we can perhaps do an overhaul of how FKs should work in JTS while we are at it.
cc @rgrp
@pwalsh @pudo this PR doesn't take into account self-referencing foreign keys (which I do need to revisit as I didn't quite understand them from the example in the spec :).
All the mentions of "resources" in the JTS spec assume that the referenced resource lives in a datapackage, no?
When a given column in the JTS has a foreign key defined, it will add a reference to that other table/column (FK’s resource/fields).