-
Notifications
You must be signed in to change notification settings - Fork 905
Closed
Description
Server module table indexes using accessor
export const player = table(
{
name: "player", public: true,
indexes: [{accessor: "playerRoom", algorithm: "btree", columns: ["roomId"]}]
},
{
identity: t.identity().primaryKey(),
roomId: t.u64(),
name: t.string(),
score: t.u32(),
color: t.string(),
joinedAt: t.timestamp()
}
)
then after I generate using CLI the result indexes change to name
room: __table({
name: 'room',
indexes: [
{ name: 'code', algorithm: 'btree', columns: [
'code',
] },
{ name: 'id', algorithm: 'btree', columns: [
'id',
] },
],
constraints: [
{ name: 'room_code_key', constraint: 'unique', columns: ['code'] },
{ name: 'room_id_key', constraint: 'unique', columns: ['id'] },
],
}, RoomRow),
causing the error on the client side
Uncaught (in promise) TypeError: Index 'id' on table 'cell_state' must define a non-empty 'accessor'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels