You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2018. It is now read-only.
This is mostly a documentation issue/caveat, important mostly because of the surprises on first use.
I expect this limitation to be a yet undocumented(?) design decision.
However some important existing tables do not have such a primary key field.
E.g. sqlite's sqlite_master table has none defined explicitly, we can only assume a composite key of (type, name).
classSQLiteMaster(Model):
table_name='sqlite_master'type=PrimaryKey()
name=PrimaryKey()
# skylark keeps track only of the last PrimaryKey, but it looks correct# the important bit: need to define at least one PK# otherwise skylark requires `id` to existdeftable_exists(table_name):
returnSQLiteMaster.findone(type='table', name=table_name) isnotNone
Hi, at first , this orm is long time no maintained, and there's no plan for forward development, the second, skylark is only designed for tables with primary keys.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is mostly a documentation issue/caveat, important mostly because of the surprises on first use.
I expect this limitation to be a yet undocumented(?) design decision.
If there is no
PrimaryKey
defined, then anid
field is implicitly expected to exist and is treated like a primary key, this implies, that it has to be defined in the database. (It is actually documented, yet surprising).However some important existing tables do not have such a primary key field.
E.g. sqlite's
sqlite_master
table has none defined explicitly, we can only assume a composite key of(type, name)
.When I have attempted to use UUID-s as primary keys (i.e. a string), the in-memory
uuid
field has been silently overwritten by a short integer (rowid
)!The text was updated successfully, but these errors were encountered: