Skip to content

Cannot define table with column named "read" #2527

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
joshua-spacetime opened this issue Mar 17, 2025 · 5 comments · May be fixed by #2525
Open

Cannot define table with column named "read" #2527

joshua-spacetime opened this issue Mar 17, 2025 · 5 comments · May be fixed by #2525
Assignees
Labels
bug Something isn't working

Comments

@joshua-spacetime
Copy link
Collaborator

A user in the public discord ran into this issue.

Apparently if you define a table like:

#[table(name = mails, public)] 
#[derive(Clone)]
pub struct Mail {
    // #[primary_key]
    // #[auto_inc]
    pub mail_id: u32,
    pub read: bool,
}

you'll get an error in Unity about Read being defined multiple times.

@joshua-spacetime joshua-spacetime added the bug Something isn't working label Mar 17, 2025
@bfops
Copy link
Collaborator

bfops commented Mar 26, 2025

this is somewhat an API break because the CLI will generate code that is incompatible with the corresponding SDK changes

@bfops
Copy link
Collaborator

bfops commented Mar 26, 2025

This will need to go into a minor version bump.

@kazimuth kazimuth linked a pull request Mar 28, 2025 that will close this issue
@joshua-spacetime joshua-spacetime transferred this issue from clockworklabs/com.clockworklabs.spacetimedbsdk Mar 28, 2025
@joshua-spacetime joshua-spacetime linked a pull request Mar 28, 2025 that will close this issue
@jdetter jdetter self-assigned this Apr 25, 2025
@jdetter
Copy link
Collaborator

jdetter commented Apr 25, 2025

I'm on review for this so I'm assigning myself

@kazimuth
Copy link
Contributor

kazimuth commented Apr 30, 2025

Apologies, I lost track of this with the Bitcraft stuff.
@bfops , from this PR CLI-generated code will not change. This change is in roslyn-generated code, which is invisible to users. I don't know what this means for versioning.
@jdetter , I think we should do ReadFields and WriteFields in a separate PR as it's going to require a separate implementation.

@jdetter
Copy link
Collaborator

jdetter commented Apr 30, 2025

I think we should do ReadFields and WriteFields in a separate PR as it's going to require a separate implementation.

Ok I'm fine with that 👍

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

Successfully merging a pull request may close this issue.

4 participants