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
I have an "unmapped" (to DB, meaning table does not contain a corresponding column) property User.phones in my struct:
use serde::{Deserialize,Serialize};use ormx::Table;#[derive(Serialize,Deserialize,Default,Debug,Clone,Table)]#[ormx(table = "users", id = id, insertable)]pubstructUser{#[ormx(default)]pubid:i32,pubusername:String,pubpassword:String,#[ormx(default)]pubphones:Vec<Phone>,}
On compile it says: error returned from database: 1054 (42S22): Unknown column 'phones' in 'field list'
As we discussed in the Discord, it needs something like #[ormx(skip)].
The text was updated successfully, but these errors were encountered:
More variants to name it: #[ormx(unmapped)], #[ormx(mapped = false)], #[ormx(column = "false")], #[ormx(column = false)], #[ormx(column = none)], #[ormx(nocolumn)].
RoDmitry
changed the title
"unmapped" property in the #[derive(Table)] struct. #[ormx(skip)]?
"unmapped" property in the #[derive(Table)] struct
May 20, 2021
I have an "unmapped" (to DB, meaning table does not contain a corresponding column) property
User.phones
in my struct:On compile it says:
error returned from database: 1054 (42S22): Unknown column 'phones' in 'field list'
As we discussed in the Discord, it needs something like
#[ormx(skip)]
.The text was updated successfully, but these errors were encountered: