nitro
nitro
CC#
Created by nitro on 7/12/2024 in #help
Foreign Key Exception on Id when attempting to insert
This got solved by the way, thanks for your time.
9 replies
CC#
Created by nitro on 7/12/2024 in #help
Foreign Key Exception on Id when attempting to insert
And I think it gets set after its record is created in the DB
9 replies
CC#
Created by nitro on 7/12/2024 in #help
Foreign Key Exception on Id when attempting to insert
No description
9 replies
CC#
Created by nitro on 7/12/2024 in #help
Foreign Key Exception on Id when attempting to insert
Oh wait
9 replies
CC#
Created by nitro on 7/12/2024 in #help
Foreign Key Exception on Id when attempting to insert
Is that because it has not been made yet for some reason?
9 replies
CC#
Created by nitro on 7/12/2024 in #help
Foreign Key Exception on Id when attempting to insert
More information: It's happening in a function that also handles the creation of the videos, and then attempts to link the genreId and videoId in the video_genres table. Essentially we have data creating record A and using that same data we are trying to create record B (maybe even C, D, E ..)
9 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
I'm going to have dinner and get back to it later.
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
Thanks for the help though, appreciate it so far 🙂
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
Yeah I'm lost again
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
Must be faster iterating over the string and pushing it into the list
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
No that's good enough for me information-wise.
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
Yes
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
How can I get them into the list instead of a string with the values comma separated?
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
Now my next question arrises
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
select
m.id,
m.title,
STRING_AGG(g.genre, ', ') as 'genre'
from
videos m
inner
join video_genres vg on m.id = vg.video_id
inner
join genres g on g.id = vg.video_id
group by
m.id,
m.title
select
m.id,
m.title,
STRING_AGG(g.genre, ', ') as 'genre'
from
videos m
inner
join video_genres vg on m.id = vg.video_id
inner
join genres g on g.id = vg.video_id
group by
m.id,
m.title
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
No description
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
No description
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
But ok wll do that now
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
Just trying to see which errors I get when changing the group by values to something that doesnt exist
401 replies
CC#
Created by nitro on 7/11/2024 in #help
Trying to map values to a single DTO
Wait
401 replies