Latest #associations Threads Top

brettbeatty
Central to my app is the Account. I have a lot of schemas that belongs_to Account. I like including corresponding has_one/has_many on Acc...
New
patrickdavey
I’m learning Ecto, and having issues trying to update following the docs. In my repo User has_many UserOrganisations, and there’s boolea...
New
sharkmyster
I’m working on a game app that has an answers table and a categories table. This relationship is many to many. The admins for the app ca...
New
1stSolo
Hello. I have a Parent Absinthe & Ecto schemas and there’s an embedded child object associated to it (1:1, so the fully inflated obj...
New
chrisdel101
I have a Role like this in DB. It is attached to both a organization and a employee. But I cannot get both fields organization_id &&a...
New
tino415
Hello all, I’m trying to implement oauth server and I’m not sure how to implement inserting token into database. For simplicity I have t...
New
leon_cruz
Hello there, I’m getting some problems in validate associations in Ecto. I have two schemas, Video and Playlist (a playlist can have many...
New
hawkyre
Hey there, this is my first post in here! I’m “just” in need of a little help with changesets and associations. I have a changeset I bui...
New
josefrichter
Hi, is there a way to have named association, please? Akin to Rails/ActiveRecord as: option. Something like this: many_to_many :users, a...
New
trisolaran
Hello :wave:, I’m trying to define a one-to-many association where the child’s foreign key is contained inside a jsonb field. I have a ...
New

This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

Last Three Year's Trending Top

Owens
I couldn’t find an answer to this from searching so thought I would make a post about it. I’m trying to get a list of Users who have not...
New
sharkmyster
I’m working on a game app that has an answers table and a categories table. This relationship is many to many. The admins for the app ca...
New
patrickdavey
I’m learning Ecto, and having issues trying to update following the docs. In my repo User has_many UserOrganisations, and there’s boolea...
New
1stSolo
Hello. I have a Parent Absinthe & Ecto schemas and there’s an embedded child object associated to it (1:1, so the fully inflated obj...
New
brettbeatty
Central to my app is the Account. I have a lot of schemas that belongs_to Account. I like including corresponding has_one/has_many on Acc...
New

Trending Over Three Years Top

mmport80
I have a query like: Alarms |> preload(:event) |> order_by([{:desc, :event[:id]}]) |> Repo.all() You can see what I am tryi...
New
omin
I have a transaction that updates upto 3 tables and it became long and ugly. I’d love to learn more to be able to write cleaner and more ...
New
thiagomajesk
Hello everyone! Something happened at work today and it kinda got me off-guard because I was expecting different behavior from Ecto. Wha...
New
Exadra37
I am trying to learn the basics of Ecto from Elixir School and I see in their examples that using this syntax Repo.all(from m in Movie, p...
New
sudochop
I’ve got an existing database with an interesting permissions model. The permissions schema are based on a php library called Spatie Perm...
New
freewebwithme
Hi! I need your help! I am trying to understand tagging system(like post has tags). But I don’t understand very well. For example, User...
New
Softknobs
Hi, It looks like Ecto prevents, by default, to change an association because on_update is :raiseby default. I naively changed my belon...
New
vadimshvetsov
I’m quite new to Elixir and Phonex but I felt in love with it so much. After books (Programming Elixir |> 1.6 and Programming Phoenix ...
New
tnederlof
I have an Event that has_one Number (the schema and migrations are shown simplified below). I can use put_assoc when inserting a number t...
New
leon_cruz
Hello there, I’m getting some problems in validate associations in Ecto. I have two schemas, Video and Playlist (a playlist can have many...
New
hawkyre
Hey there, this is my first post in here! I’m “just” in need of a little help with changesets and associations. I have a changeset I bui...
New
CherryMan
Say I have the following models import Ecto.Changeset import Ecto.Schema defmodule Parent do schema "parents" do has_one :child, ...
New
thojanssens1
Say I have the following schemas: defmodule Articles do schema "articles" do field(:name, :string) embeds_one(:foo, Foo) end...
New
thojanssens1
Say user input params (from a form, GraphQL document, etc.) look like below (let’s say a User has many Articles): %{ "name" => "Joh...
New
bagasprstyadi
Hi guys just wondering is it possible to preload but with a condition from the main query Let’s say I have a model named Post. A Post ha...
New
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement