We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58da519 commit e8d49eaCopy full SHA for e8d49ea
store/postgres/src/relational_queries.rs
@@ -1049,12 +1049,17 @@ impl<'a> InsertQuery<'a> {
1049
for column in table.columns.iter() {
1050
match column.fulltext_fields.as_ref() {
1051
Some(fields) => {
1052
- let fulltext_updates = fields
+ let fulltext_field_values = fields
1053
.iter()
1054
.filter_map(|field| entity.get(field))
1055
.cloned()
1056
- .collect();
1057
- entity.insert(column.field.to_string(), Value::List(fulltext_updates));
+ .collect::<Vec<Value>>();
+ if !fulltext_field_values.is_empty() {
1058
+ entity.insert(
1059
+ column.field.to_string(),
1060
+ Value::List(fulltext_field_values),
1061
+ );
1062
+ }
1063
}
1064
None => (),
1065
0 commit comments