Multiple foreign keys to same table using Elixir
- by Suvir
Hello,
I am new to ORMs in general. I have a table (lets call it Entity) with columns --
ID
expression
type ( can be 'long_word', 'short_word' or 'sentence' )
Often, the first two types occur in a 'sentence', so, I want to maintain another table which maps 'Sentences' to 'long_word' or 'short_word' using the 'ID' field.
All i need is another table with 2 'Integer fields' referring to 'ID' as a foreign key.
But, how do i do this in Elixir?
Thanks a lot...