We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
module EveToolsApi::Models abstract class Contract include Clear::Model self.table = "contracts" column contract_id : Int32, primary: true polymorphic EveToolsApi::Models::Courier, EveToolsApi::Models::ItemExchange, through: "type" end end
module EveToolsApi::Models class Courier < EveToolsApi::Models::Contract column reward : Int32 end end
module EveToolsApi::Models class ItemExchange < EveToolsApi::Models::Contract column price : Int32 end end
ItemExchange.create({contract_id: 3, price: 123})
pg | 2018-09-02 22:53:53.905 UTC [3486] ERROR: null value in column "contract_id" violates not-null constraint pg | 2018-09-02 22:53:53.905 UTC [3486] DETAIL: Failing row contains (null, EveToolsApi::Models::ItemExchange, 0, 123). pg | 2018-09-02 22:53:53.905 UTC [3486] STATEMENT: INSERT INTO "contracts" ("type", "price") VALUES ('EveToolsApi::Models::ItemExchange', 123) RETURNING * api2 | Error catched, last request was: api2 | INSERT INTO "contracts" ("type", "price") VALUES ('EveToolsApi::Models::ItemExchange', 123) RETURNING *
The text was updated successfully, but these errors were encountered:
30465b5
No branches or pull requests
ItemExchange.create({contract_id: 3, price: 123})
The text was updated successfully, but these errors were encountered: