Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Duplicate "column" names in model crashes app #169

kotedo opened this Issue · 3 comments

2 participants

Kai Janson Zachary Kessin
Kai Janson

If you add duplicate column names the application will crash upon startup with error
messages that are less than helpful in finding the bug.

I found it by removing all models from the model directory and reintroduced them one by one until it crashed again. Then I inspected it very carefully and noticed that I had two column names that were identical by accident.

So, duplicate column names should be identified as such and reported upon.

I used MongoDB for the database. Thus "column" names.

Zachary Kessin

In theory you should not be able to have duplicate column names at all,
I am assuming that you have a module something like this, we should reject this with an error message

-module(dup, [Id   :: integer(),
              Test :: binary(),
              Test :: binary()]).
Kai Janson

Your assumption is correct. The compiler runs through it right now and fails later.
Maybe this can be caught during compilation?

Zachary Kessin

It will now refuse to compile the module and give a useful error

Zachary Kessin zkessin closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.