I believe that we can rather easily implement composite primary keys without adding any new attributes, if we put the composite key into a separate struct, e.g.
Then the two fields of OrderPrimaryKey would become columns of the Order table. #[pk] would need to do a bit more work to support this, and we may need to put #[derive(FieldType)] on OrderPrimaryKey so it can do some additional preparation work.
I believe that we can rather easily implement composite primary keys without adding any new attributes, if we put the composite key into a separate struct, e.g.
Then the two fields of
OrderPrimaryKey
would become columns of theOrder
table.#[pk]
would need to do a bit more work to support this, and we may need to put#[derive(FieldType)]
onOrderPrimaryKey
so it can do some additional preparation work.