Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
DenisMtfl opened this issue Mar 7, 2025 · 0 comments
Open

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

DenisMtfl opened this issue Mar 7, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@DenisMtfl
Copy link

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

@DenisMtfl DenisMtfl added the bug Something isn't working label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant