many-to-many Questions
4
I have a users table and a permissions table. It's a many-to-many relationship so I also have a users_permissions table with a user_id & module_permission_id column.
The user model has the fol...
Visitation asked 30/5, 2017 at 10:2
4
I got "NotSupportedException: Collection was of a fixed size" when I try to insert into the linking table in Many-to-Many in ASP.NET Core 2.2.
I can insert values manually in SQL Server!
My entiti...
Dulse asked 4/5, 2019 at 15:21
4
I use intermediate model for "ManyToManyField using the through"
Normally,If I don't use intermediate field, the m2m relation will be unique and can't have the duplicated data.
After I us...
Fluxmeter asked 7/2, 2013 at 14:36
2
I have: two entities with undirectional M:M association.
class ShareInfo
{
// ...
/**
* @ORM\ManyToMany(targetEntity="Item")
* @ORM\JoinTable(name="share_info_items",
* joinColumns={@ORM\Joi...
Patio asked 5/5, 2015 at 21:10
7
Solved
If I have two objects that have a many-to-many relationship, I would typically model them in my database schema with a many-to-many table to relate the two. But should that many-to-many table (or "...
Eatmon asked 21/12, 2010 at 21:0
5
Solved
I have a query that requires to filter exactly 2 authors with the ID
Theoretically,
Book.objects.filter(author__id=1, author__id=2).
which is not possible.
How can I solve this problem?
Che...
Limnology asked 14/3, 2011 at 17:16
12
Solved
I've got a many-to-many relationship between my employees and the group table. I've created the pivot table, and all is working correctly with that. However, I've got a sortOrder column on my emplo...
Tilla asked 14/7, 2013 at 21:42
5
Solved
I'm trying to insert values into a Many2many or One2many relation table field in Odoo (former OpenERP). Do you have any idea how to do this?
Virg asked 21/2, 2012 at 12:11
4
I have two Entity Framework Entities.
1) Employee
2) Case
I've modeled a many to many relationship in Entity Framework Core.
I am able to add a relationship in like this:
[HttpPost]
public asy...
Juglandaceous asked 18/4, 2017 at 20:24
2
Solved
I am using Spring boot and trying to implement many to many relationship between User and Skill. I have a table users_skills with columns user_id and skill_id. I keep getting "JoinColumn cannot be ...
Praemunire asked 13/11, 2015 at 15:28
4
Solved
I learned about many-to-many relationships in College, and I never really understood them. So far I've been working with one-to-many relationships which are easy to understand and deal with.
Can so...
Diplopia asked 22/7, 2018 at 9:27
4
Solved
I've set up a simple many-to-many relationship account : role with Hibernate but when I try to save an account in a unit test after it has had its role added I get an UnsupportedOperationException:...
Barchan asked 15/9, 2011 at 8:40
2
Solved
I have the following mapping:
@Entity
@Table(name = "Prequalifications")
public class Prequalification implements Serializable
{
...
@ManyToMany
@JoinTable(name = "Partnerships", joinColumns =...
Weider asked 17/3, 2012 at 14:33
5
Solved
I haven't found any MYSQL many-to-many relationships examples here and in google. What I am looking is to see a very simple example with php+mysql showing database's results. Can anybody write a ve...
Seringa asked 27/5, 2010 at 18:29
2
So, I have the following models:
class Band(models.Model):
name = models.CharField(max_length=50)
class Contract(models.Model):
band = models.ForeignKey(Band)
when = models.DateTimeField(auto_...
Burgett asked 9/10, 2015 at 5:20
1
Solved
I have two collections in Directus (data platform that provides many features including REST API over database records). There is option to set relationship between different collections.
I set man...
Parturient asked 25/12, 2022 at 9:36
2
Solved
When you have a many-to-many relationship (related_name, not through) and you are trying to use the admin interface you are required to enter one of the relationships even though it does not have t...
Schuman asked 27/3, 2010 at 13:43
1
I'm trying to create a friendship mechanic for my app using Prisma among other tools. In the docs it shows the following example for how to create a many-to-many self relation:
model User {
id Int...
Bluenose asked 4/10, 2022 at 3:0
3
Solved
I've already read this, this and this, but I cant make this SQL work:
INSERT INTO main_phrase (description) VALUES ('Mot commun féminin pluriel animaux');
/* ERROR: */
WITH
t1 AS (
SELECT id
F...
Seductress asked 9/1, 2016 at 0:11
3
Solved
What is the difference between syncWithoutDetaching and attach in Laravel?
Administrator asked 30/5, 2020 at 14:53
1
Solved
When should you use a implicit many to many relationship in prisma and when explicit many to many relationship ?
Do they have any trade-off or anything that should be noted
Barthol asked 29/9, 2022 at 17:16
7
Solved
I have this scenario:
public class Member
{
public int MemberID { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public virtual ICollection<Comment...
Closefisted asked 13/8, 2011 at 12:29
2
I am using JPA with Hibernate as the implementation in my Spring webapp.
I use EntityListeners for auditing (Spring-data) and other notification purposes. In general it works fine. However, when c...
Mcgean asked 12/6, 2013 at 10:31
4
Solved
I have 2 POJO classes in Java, Answer and Collaborator, in a many-to-many relationship.
class Answer {
@ManyToMany(cascade = CascadeType.ALL)
@JoinTable(name = "ANSWERS_COLLABORATORS", joinColum...
Leia asked 15/11, 2011 at 11:24
3
Solved
I have some entities with@ManyToMany relation:
@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
@JoinTable(name = "buses_drivers",
joinColumns = @JoinColumn (name = "driver_id_inne...
Ane asked 26/3, 2016 at 18:18
1 Next >
© 2022 - 2024 — McMap. All rights reserved.