diff --git a/src/clear/model/collection.cr b/src/clear/model/collection.cr index a82e98fe9..92729c7ca 100644 --- a/src/clear/model/collection.cr +++ b/src/clear/model/collection.cr @@ -691,7 +691,7 @@ module Clear::Model # Redefinition of `join_impl` to avoid ambiguity on the column # name if no specific column have been selected. protected def join_impl(name, type, lateral, clear_expr) - self.set_default_table_wildcard(Clear::SQL.escape(T.table)) + self.default_wildcard_table = Clear::SQL.escape(T.table) super(name, type, lateral, clear_expr) end diff --git a/src/clear/sql/query/select.cr b/src/clear/sql/query/select.cr index a6ebdaff1..203b91218 100644 --- a/src/clear/sql/query/select.cr +++ b/src/clear/sql/query/select.cr @@ -14,7 +14,7 @@ module Clear::SQL::Query::Select # In some case you want you query to return `table.*` instead of `*` # if no select parameters has been set. This occurs in the case of joins # between models. - def set_default_table_wildcard(table : String? = nil) + def default_wildcard_table=(table : String? = nil) @default_wildcard_table = table change! end