datajoint / datajoint-docs-original

https://docs.datajoint.org
Other
2 stars 13 forks source link

Renamed foreign key when defining a new table needs an example. #185

Closed shenshan closed 5 years ago

shenshan commented 5 years ago

An example such as:

@schema
class ThisTable(dj.Manual):
...
(new_name) -> AnotherTable
...
dimitri-yatsenko commented 5 years ago

The syntax has changed. The example above would now look like:

@schema
class ThisTable(dj.Manual):
    definition = """
    ...
    -> AnotherTable.proj(new_name="old_id")
    ...
    """

However, I think the documentation already contains examples: https://docs-dev.datajoint.io/python/definition/10-Dependencies.html#renamed-foreign-keys

shenshan commented 5 years ago

Ok. Good to know. Thanks!