CompositeKeyAttribute does not create any composite key on the table

As title, I’ve created a table as:

[CompositeKey(nameof(FilterUniquifier), nameof(IdToFilter))]
public class LRTFiltriSqlIn
    public string Id => "{FilterUniquifier}|{IdToFilter}"; // i've removed the dollar simbol does to a glitch?

    public long FilterUniquifier { get; set; }

    public int IdToFilter { get; set; }

I can see that on SQL Server, no key or index gets created at all. How can I create a Composite Unique Clustered Index from that table and OrmLite?

You can use [CompositeIndex] to create a composite index in OrmLite.

I don’t know why you’re using [CompositeKey] it’s not used or documented anywhere in OrmLite, it’s only used by PocoDynamo.

My PrimaryKey is actually those 2 fields. CompositeIndex can help me but things like SaveAll() crashes without a PrimaryKey. I tought CompositeKey was a way to define a PrimaryKey with 2 fields.

I don’t know why you would think that, there’s no docs or example of it ever having been used in OrmLite.

Unless it’s been documented somewhere, or used in a test case, it doesn’t exist, in which case you can raise a feature request but don’t open a support request asking why something that has never existed doesn’t work.

A fundamental limitation that has always existed in OrmLite is that it only supports a single primary key.