8,787 questions
Advice
0
votes
3
replies
44
views
How to set the value in the basic many-to-many relationship example of EF?
Here's a basic example from the official .NET documentation for a many-to-many relationship using EF and .NET:
public class Post
{
public int Id { get; set; }
public List<Tag> Tags { get;...
0
votes
1
answer
58
views
Spring boot (Java) ManyToMany 415 error when sending POST
I have the most basic ManyToMany example, Project and Employee.
With a PUT request, I will project to employee and within the same function employee to project.
public Employee assignProjectToEmployee(...
0
votes
2
answers
152
views
Insert record into many-to-many relationship [duplicate]
I want to create a database for my blog website where I have many posts and categories. A post can have many categories and a category can have many posts. I couldn't figure out how to implement it in ...
3
votes
1
answer
77
views
How to query models with a where condition on the pivot table using a many-to-many relationship?
I have two models, User and Role. These two models have many-to-many relationship between each other with pivot table role_user. In this pivot table are values user_id, role_id and meta_value. ...
2
votes
0
answers
19
views
Power BI Many to Many relationship with vessels issue
I have a table which has VesselPositions for every insured ship. Everyday new data is added for the vessel.
In that Table I have a column named: IMO, Longitutude, Latitude, VesselPositionDate.
I also ...
2
votes
2
answers
198
views
How to automatically update extra column in sqlalchemy association table?
I have a postgresql database setup with sqlalchemy, joined table inheritance and a many-to-many association table with an extra column position, i.e. assessments and tasks are related via the ...
0
votes
0
answers
41
views
Laravel many to many relation between TWO polymorphic types
I want to create a relationship between parents (which can be Mother or Father models) and their children (Son and Daughter models). For exemple purposes, they are defined like this:
father:
id
...
0
votes
0
answers
51
views
NHibernate Many-to-many Filter Stopped Working After 5.2 Update
I encountered a problem when I try to update from 5.1.7 to 5.2.0
using System;
using System.Collections;
using System.Collections.Generic;
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
...
0
votes
1
answer
112
views
Spring Boot Many to many POST both ways
newbie to spring boot here.
I've been following this tutorial: https://www.youtube.com/watch?v=jCYonZey5dY&t=1145s
My implementation is about books and authors and I want the same functionality. ...
0
votes
1
answer
50
views
Filter Laravel Eloquent Query with relationship based on having multiple many-to-many-relationships
I have Tasks that have many-to-many relationships with Locations.
I want the user to be able to select "home" and "work" as an example out of a list of locations and then a toggle ...
1
vote
1
answer
188
views
SQLAlchemy join & filter
I am new to SQLAlchemy and develop a small FastAPI application using SQLAlchemy and SQLite. I have several tables, it's just a small example:
USERS:
class UserEntity(BaseEntity):
"""...
0
votes
1
answer
41
views
How to choose manually from a collection subset in strapi admin panel
I am building a back office with strapi. I don't have any special config/plugins.
I would like to have a private list storing all skills (AllSkill) (a skill is an image and a name).
In order to do so,...
1
vote
1
answer
53
views
sequelize-typescript many-to-many on same table, include acts weird
I am implementing a social network where a User can follow another user.
So I have a Follow model:
export default class Follow extends Model {
@PrimaryKey
@ForeignKey(() => User)
@...
0
votes
2
answers
50
views
Eloquent ORM many-to-many relationship between string and int primary keys
I have been struggling to make this happen, but every time I failed.
I have two models - Map and User, and both can have many Maps (or users, respectively). Thi thing is, map has a primary key slug, ...
-1
votes
1
answer
45
views
Multipe one-to-many relation between two models
I was creating a route finder and I created a vehicle model with relations start_location and final_location. I want them to be foreign keys as I don't want to have multiple options when selecting ...
0
votes
0
answers
41
views
Hibernate JPA fails to cascade persist MxN relationship with Class
The title is confuse I will try to clarify.
I've class A and B that have MxN relationship. However as this relationship has attributes I needed to create a class AB to hold the relationship.
I've set ...
2
votes
1
answer
45
views
Filtering Products by multiple (a set of) Many to Many Variations
Can anyone please help me to filter a products table, by a set of Many to Many Variations in SQL Server? Filtering by a single variation is straightforward, but I can't get my head around multiple.
I ...
0
votes
1
answer
48
views
@Version causing update on Entity when modifying collection
I noticed that when I have a ManyToMany relationship and @Version field on an entity then when I try to add some other entitys that have relationship with this entity hibernate triggers an update on ...
0
votes
2
answers
53
views
Foreign Key Constraint Violation for ManyToMany Mapping (Postgresql)
I have a bidirectional ManyToMany mapping, and I am trying to delete a post entity. When I delete it, the reference in the posts_categories table should also be removed. However, despite trying the ...
0
votes
1
answer
87
views
Entity Framework Core 8.0.10 does not load related data
I have the User and Role models. Where a many-to-many relationship is generated between both models, represented by a collection at both ends:
ICollection<User> Users {get;set:} in the Role ...
1
vote
0
answers
21
views
SQLAlchemy many-to-many relationship with ordered association
I'm trying to create a self-referencing many-to-many relationship in sqlalchemy to be able to retrieve and modify them while ensuring the correct order.
I have a table of servers, and would like to ...
0
votes
1
answer
18
views
Sequelize Many-to-Many on same table
I have a user:
@Table({
underscored: true,
})
export default class User extends Model {
@PrimaryKey
@Column
id: string;
@AllowNull(false)
@Column
name: string;
@...
0
votes
0
answers
19
views
Sequelize doesn't fetch the assosiated model with a GET request
Sequelize doesn't fetch the assosiated model in the get request, but it works in the POST and DELETE requests with two parameters provided. I have an M-M relationship between the Worker and Owner id(...
0
votes
1
answer
184
views
FastAPI Users making subscriptions model
Got exception:
sqlalchemy.exc.ArgumentError: Relationship User.followings could not determine any unambiguous local/remote column pairs based on join condition and remote_side arguments. Consider ...
3
votes
2
answers
69
views
Laravel Many-to-Many Relationship giving wrong result
I am developing a database for giveaways. I have two main tables: participants and giveaways with an N:N relationship since a participant can participate to one or more giveaways and a giveaway can ...