In my database i have a table with column pruebauuid uniqueidentifier and in my schema used type :binary_id or :uuid or Ecto.UUID but always have same problem
Expected Behavior
Hi
I have a problem to use type uniqueidentifier.
In my database i have a table with column pruebauuid uniqueidentifier and in my schema used type :binary_id or :uuid or Ecto.UUID but always have same problem
Column type not supported | ODBC_CODE | SQL_SERVER_CODE 0
lib/ecto/adapters/sql.ex
431 case sql_call(repo, :prepare_execute, [name, prepared], params, mapper, opts) do
432 {:ok, query, %{num_rows: num, rows: rows}} ->
433 update.({id, query})
434 {num, rows}
435 {:error, err} ->
436 raise err
437 end
438 end
439
440 defp execute_or_reset(repo, id, reset, cached, params, mapper, opts) do
441 case sql_call(repo, :execute, [cached], params, mapper, opts) do
defmodule Usuario do
use Ecto.Schema
import Ecto
import Ecto.Changeset
import Ecto.Query
schema "usuario" do
field :nombre, :string
field :valor, :integer
field :pruebauuid, Ecto.UUID
end
def changeset(struct, params) do
struct
|> cast(params, [:nombre, :valor])
|> validate_required(:nombre)
end
end
3.
table sql
create table usuario(
id int auto_increment,
nombre varchar(50),
valor int,
pruebauuid uniqueidentifier,
primary key(id)
)
mix phx.server
Context
All database tables have type uniqueidentifier how primary key or other attribute. I need use uniqueidentifier type
Your Environment
MssqlEcto version: 0.3.1
Ecto version: 2.1.6
Elixir version: 1.5.3
Erlang version: 9.0
Microsoft SQL Server version: SQL SERVER 2014
Operating System and version: Windows 10 Pro, 64-bit
In my database i have a table with column
pruebauuid uniqueidentifier
and in my schema used type :binary_id or :uuid or Ecto.UUID but always have same problemExpected Behavior
Hi I have a problem to use type uniqueidentifier. In my database i have a table with column
pruebauuid uniqueidentifier
and in my schema used type:binary_id
or:uuid
orEcto.UUID
but always have same problemColumn type not supported | ODBC_CODE | SQL_SERVER_CODE 0
lib/ecto/adapters/sql.ex
Steps to Reproduce (for bugs)
1.
mix.ex
2.
usuario.ex
3.
table sql
mix phx.server
Context
All database tables have type uniqueidentifier how primary key or other attribute. I need use uniqueidentifier type
Your Environment
Extra information
file_system 0.2.2 connection 1.0.4 gettext 0.14.0 ranch 1.3.2 poolboy 1.5.1 decimal 1.4.1 poison 3.1.0 earmark 1.2.4 ex_doc 0.18.1 db_connection 1.1.2 ecto 2.1.6 phoenix_pubsub 1.0.2 cowlib 1.0.2 cowboy 1.1.2 uuid 1.1.8 mime 1.2.0 plug 1.4.3 phoenix_html 2.10.5 phoenix 1.3.0 phoenix_live_reload 1.1.3 mssqlex 0.8.0 mssql_ecto 0.3.1 phoenix_ecto 3.3.0