Skip to content

Can not create a table with multiple primary key with SQLiteConnection.CreateTable<>() #282

@lionpham

Description

@lionpham

I have an entity:

class Entity
    {
        [PrimaryKey]
        public int FirstKey { get; set; }

        [PrimaryKey]
        public int SecondKey { get; set; }
    }

I use SQLiteConnection.CreateTable<>() to create table:

SQLiteConnection.CreateTable<Entity>();

However, I got the following error: table "Entity" has more than one primary key.

Please help. Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions