-
-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
enhancementNew feature or requestNew feature or request
Description
For now there's only support for a single field as a primary key. Would be nice to have a composite_primary_key attribute as well. Ideally, this should inherently create a logical key(eg. pk) that is a tuple of the composites.
#[model]
struct Bar{
#[model(primary_key)]
id: Auto<u32>
}
#[model]
struct Baz{
#[model(primary_key)
id: Auto<u32>
}
#[model]
struct Foo{
#[model(composite_key)]
bar: ForeignKey<Bar>,
#[model(composite_key)]
baz: ForeignKey<Baz>,
} Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request