Skip to content

One-to-One relationship does not select all columns #109

Open
@DenisMtfl

Description

@DenisMtfl

Describe the bug

On a One-to-One relationship not all columns are selected, only the primary key is selected
in supabase its a foreign-key attribute. So it should be.

To Reproduce

Column "Name" from Kategorie is not populating, bit Id and relation is there

var response = await _client.Postgrest.Table<TableA>().Get();

[Table("tableA")]
public class TableA: BaseModel
{
    [PrimaryKey("Id")]
    public Guid Id { get; set; }
    
    public string Name { get; set; } = null!;    
    
    [Reference(typeof(Kategorie))]
    public Kategorie? Kategorie { get; set; }    
}
[Table("kategorie")]
public class Kategorie : BaseModel
{
    [PrimaryKey("Id")]
    public Guid Id { get; set; }

    public string Name { get; set; }
}

Expected behavior

when you Get() it should be able to select all related columns

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions