I created a table in Oracle 19c, via Ecto.Migration with a boolean column, which got created as CHAR(1) via
defp ecto_to_db(:boolean), do: "char"
in jamdb_oracle_query.ex.
But inserting a row via Ecto.Repo and a corresponding schema with a :boolean column seems not to do anything with true/false. I see this in the log output:
INSERT INTO .... [true]
and get
ORA-12899: value too large for column ... (actual: 2, maximum: 1)
as the error message. (Not sure why it says 'actual: 2' and not 'actual: 4')
Note: using :string in the Ecto.Schema, and converting to and from booleans in my application is a workaround, I thing.
I know that Oracle introduced proper booleans much later (23 I think), but
maybe the current 'partial support' for booleans could be fixed?
(Fixed to 'char(1)' for not, but eventually configurable what to use instead of booleans?)
If not, I would appreciate a hint to where the Repo.insert and update (and probably where?) statements could be adjusted in the jamdb code.
Then I could do a fix that just "works for me", in my fork.
Hi,
I created a table in Oracle 19c, via Ecto.Migration with a boolean column, which got created as
CHAR(1)
viain
jamdb_oracle_query.ex
.But inserting a row via Ecto.Repo and a corresponding schema with a
:boolean
column seems not to do anything withtrue
/false
. I see this in the log output:and get
as the error message. (Not sure why it says 'actual: 2' and not 'actual: 4')
Note: using
:string
in the Ecto.Schema, and converting to and from booleans in my application is a workaround, I thing. I know that Oracle introduced proper booleans much later (23 I think), but maybe the current 'partial support' for booleans could be fixed? (Fixed to 'char(1)' for not, but eventually configurable what to use instead of booleans?)If not, I would appreciate a hint to where the
Repo.insert
andupdate
(and probablywhere
?) statements could be adjusted in the jamdb code. Then I could do a fix that just "works for me", in my fork.Greets, David