Use for auto increment columns or columns calculated from database triggers.
sql
Field mapped to SQL expression instead of table column
Insert the table alias with two dots: sql ="SELECT COUNT (*) FROM Message m WHERE m.user_id = ..id". Skipped for insert, update
sql_join
Required for fields that are structs.
sql join needs column names in self and other, with on an extra sql condition can be given: sql_join( self="column_name_on_this_table", other="column_name_on_joined_table", on="friend.best = true"). For composite keys use multiple sql_join.
merge
required for fields that are Vec<>.
merge needs struct field names in self and other: merge(self="rust_field_name_in_this_struct", other="rust_field_name_on_other_struct"). For composite fields use multiple merge.
ignore_wildcard
No selection for ** and *
alias
Alias for sql_join
table
Table name for joins and merges
role
Required role for field access
role="admin", role= "superadmin" For multiple roles use multiple role.