You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So when instantiating it, it should be enough to do:
let table_row:User = User{name:"mjovanc".to_string(),};
This is important since when doing INSERT operations when having autoincrement on the id field and not knowing the current id beforehand, and we definitely do not want to query to get that information before...
The text was updated successfully, but these errors were encountered:
mjovanc
changed the title
Generate id field during instantiation of Table derived struct based on proc attribute
Fix id field during instantiation of Table derived struct based on proc attribute
May 9, 2024
We need to add
#[primary_key]
or something similar over the field like this:So when instantiating it, it should be enough to do:
This is important since when doing
INSERT
operations when having autoincrement on the id field and not knowing the current id beforehand, and we definitely do not want to query to get that information before...The text was updated successfully, but these errors were encountered: