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
This rarely presents a problem. However, if you're writing a reduced test case, keep in mind that the minimum supported number of attributes in a table is 2
> Country.create name: 'Italy'
TRANSACTION (0.1ms) BEGIN
Country Create (5.4ms) INSERT INTO "countries" ("name") VALUES ($1) RETURNING "id" [["name", "Italy"]]
TRANSACTION (0.2ms) COMMIT
> Country.last.update name: 'Italia'
Country Load (0.9ms) SELECT "countries".* FROM "countries" ORDER BY "countries"."id" DESC LIMIT $1 [["LIMIT", 1]]
TRANSACTION (0.1ms) BEGIN
Country Update (4.4ms) UPDATE "countries" SET "name" = $1 WHERE "countries"."id" = $2 [["name", "Italia"], ["id", 1]]
TRANSACTION (0.1ms) ROLLBACK
~/.rvm/gems/ruby-3.1.2/gems/activerecord-7.0.4/lib/active_record/connection_adapters/postgresql_adapter.rb:768:in `exec_params': PG::FeatureNotSupported: ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression (ActiveRecord::StatementInvalid)
LINE 1: UPDATE ONLY temporal.countries SET ( "name" ) = ( NEW."name"...
^
QUERY: UPDATE ONLY temporal.countries SET ( "name" ) = ( NEW."name" ) WHERE id = OLD.id
CONTEXT: PL/pgSQL function chronomodel_countries_update() line 34 at SQL statement
~/.rvm/gems/ruby-3.1.2/gems/activerecord-7.0.4/lib/active_record/connection_adapters/postgresql_adapter.rb:768:in `exec_params': ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression (PG::FeatureNotSupported)
LINE 1: UPDATE ONLY temporal.countries SET ( "name" ) = ( NEW."name"...
^
QUERY: UPDATE ONLY temporal.countries SET ( "name" ) = ( NEW."name" ) WHERE id = OLD.id
CONTEXT: PL/pgSQL function chronomodel_countries_update() line 34 at SQL statement
Workarounds
Add timestamps
Add another field
The text was updated successfully, but these errors were encountered:
tagliala
changed the title
Chronomodel does not support one-attribute models
Chronomodel does not support update on one-attribute models
Oct 25, 2022
tagliala
changed the title
Chronomodel does not support update on one-attribute models
Chronomodel does not support update on single-attribute models
Oct 25, 2022
tagliala
changed the title
Chronomodel does not support update on single-attribute models
Update on single-attribute models is not supported
Oct 25, 2022
This rarely presents a problem. However, if you're writing a reduced test case, keep in mind that the minimum supported number of attributes in a table is 2
How to replicate:
Workarounds
The text was updated successfully, but these errors were encountered: