-
Notifications
You must be signed in to change notification settings - Fork 608
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
Property 'name' does not exist on type 'Model' #1826
Comments
why is there an exclamation mark after the column names? |
if i dont put exclamation mark this is the error i get
i am developing in react native typescript |
@rizdaputra Ahh ok I'm not really familiar with typescript, sorry!I actually just realized 2 things that might be your issue:
|
I do not think this is directly related to my issue, but to be honest I do not see many people responding to any GitHub Issues recently so hopefully @KrisLau or @rizdaputra can provide some feedback / advice on my issue with create / prepareCreate 🙏 I am able to get my DB creates to write to my sqlite database fine but the non core properties (i.e., not Note
I have tried with a full write transaction / create: await newDb.write(async () => {
const newRow = await newDb.get<Testing2>('testing').create((theRow) => {
theRow.title = 'title 1';
});
console.log('newRow:', newRow);
}); As well as just trying to test using prepareCreate before writing it: const newRow = newDb.get<Testing2>('testing').prepareCreate((theRow) => {
theRow.title = 'title 1';
});
console.log('newRow:', newRow); In either case, I get the following where I see my My assumption is that the actual writing to sqlite uses the Do you know what I could be doing wrong? It seems like at some point in the process, WatermelonDB is supposed to "merge" any properties we set like I am just following the example from the docs here: https://watermelondb.dev/docs/CRUD#create-a-new-record Thanks in advance for any help, thoughts or feedback you can provide! |
i am trying to do batch create but when i prepareCreate i receive this error when following the examples given, can anyone help?
this is roughly my code, the newService is detected as Model and it is said that Model dont ave name baseUrl etc.
this is my model definition
The text was updated successfully, but these errors were encountered: