zimt28
zimt28
AEAsh Elixir
Created by zimt28 on 5/31/2023 in #support
Nested forms questions
Using the updater, is there a way to get the parent form so that I can build the forms dynamically?
16 replies
AEAsh Elixir
Created by zimt28 on 5/31/2023 in #support
Nested forms questions
All right, I'll open an issue
16 replies
AEAsh Elixir
Created by zimt28 on 5/31/2023 in #support
Nested forms questions
Using my new helper I can just add and remove a new child to "refresh" the form, it works for now but I'd like to see it there's a better solution to both questions
16 replies
AEAsh Elixir
Created by zimt28 on 5/31/2023 in #support
Nested forms questions
I can solve no 2 by just following the path, so that's not super important
16 replies
AEAsh Elixir
Created by zimt28 on 5/31/2023 in #support
Nested forms questions
Any ideas about 2 and 3?
16 replies
AEAsh Elixir
Created by zimt28 on 5/31/2023 in #support
Nested forms questions
Nice, problem 1 solved 🙂
16 replies
AEAsh Elixir
Created by zimt28 on 5/29/2023 in #support
Access parent result using manage_relationship
Ok, I'll open an issue then 🙂
3 replies
AEAsh Elixir
Created by zimt28 on 5/23/2023 in #support
Fetching descendants in calculation
I thought about just translating a query similar to the following to ecto and then passing it the list of record ids in the calculation, but maybe there's a better way?
WITH RECURSIVE parents AS (
SELECT
id,
type,
0 AS number_of_ancestors,
ARRAY[id] AS ancestry,
NULL::uuid AS parent,
id AS start_of_ancestry
FROM
listings
WHERE
id in ('11fa5e30-2fff-46ef-ae14-5ea81ecd43c1')
UNION
SELECT
child.id,
child.type,
p.number_of_ancestors + 1 AS ancestry_size,
array_append(p.ancestry, child.id) AS ancestry,
child.parent_listing_id AS parent,
coalesce(p.start_of_ancestry, child.parent_listing_id) AS start_of_ancestry
FROM
listings child
INNER JOIN parents p ON p.id = child.parent_listing_id
)
SELECT
id,
type,
number_of_ancestors,
ancestry,
parent,
start_of_ancestry
FROM
parents;
WITH RECURSIVE parents AS (
SELECT
id,
type,
0 AS number_of_ancestors,
ARRAY[id] AS ancestry,
NULL::uuid AS parent,
id AS start_of_ancestry
FROM
listings
WHERE
id in ('11fa5e30-2fff-46ef-ae14-5ea81ecd43c1')
UNION
SELECT
child.id,
child.type,
p.number_of_ancestors + 1 AS ancestry_size,
array_append(p.ancestry, child.id) AS ancestry,
child.parent_listing_id AS parent,
coalesce(p.start_of_ancestry, child.parent_listing_id) AS start_of_ancestry
FROM
listings child
INNER JOIN parents p ON p.id = child.parent_listing_id
)
SELECT
id,
type,
number_of_ancestors,
ancestry,
parent,
start_of_ancestry
FROM
parents;
7 replies
AEAsh Elixir
Created by Dirigible on 2/26/2023 in #support
How to Delete Resource?
You might also need to remove constrains & indexes I guess? Would be nice if there was a generator for this 🙂
6 replies
AEAsh Elixir
Created by Stefan Wintermeyer on 2/9/2023 in #support
Which type for Text?
3 replies
AEAsh Elixir
Created by Jmanda on 1/31/2023 in #support
Setting Tenant when using Context Multitenancy
But it would still be nice to have a callback somewhere that allows passing an actual tenant and converting it to a string in the callback
23 replies
AEAsh Elixir
Created by Jmanda on 1/31/2023 in #support
Setting Tenant when using Context Multitenancy
I think the typespec is wrong, but I cannot check right now
23 replies
AEAsh Elixir
Created by Jmanda on 1/31/2023 in #support
Setting Tenant when using Context Multitenancy
It still works but ElixirLS will complain
23 replies
AEAsh Elixir
Created by Jmanda on 1/31/2023 in #support
Setting Tenant when using Context Multitenancy
If I remember correctly set_tenant/1 expects a map, even though it should be a string
23 replies
AEAsh Elixir
Created by ZachDaniel on 1/26/2023 in #showcase
Is Ash Framework the Real Deal for Elixir Devs?
11 replies