Questions tagged [one-to-many]
one-to-many is relationship between two different object properties.
one-to-many
3,743
questions
2
votes
4
answers
79
views
Create Vector from One-to-Many Dataframe in R
I have a dataframe with a one-to-many relationship where the one in the relationship are the column names and the many in the relationship are entries in the first column. I would like to create a ...
0
votes
1
answer
19
views
Is it a one-to-many or many-to-many relationship?
I was wondering whether the following would be either one-to-many or many-to-many relationship
The Users and Services tables are defined as follows:
USERS SERVICES
+---+------------+...
0
votes
0
answers
27
views
Eager Loading One-to-Many Relationship in Laravel Returns Empty Collection Despite Data Being Present
I'm facing an issue with eager loading in Laravel where a one-to-many relationship returns an empty collection, even though there is data present in the database. The same relationship works correctly ...
0
votes
1
answer
25
views
Micronaut R2DBC Parent Child Relationship Parent ID not getting inserted into child (One to Many)
I am new to R2DBC and I have a fairly standard parent child relationship Person / Address and when attempting to save a person object with an address both the person and the address get saved but the ...
0
votes
1
answer
28
views
Problem with One-To-Many and Many-To-One relations in TypeORM: Incorrect SQL query generated
I'm learning typeORM and I'm stucked with a problem. I've created 3 entities, CategoryTypeAttribute, ItemAttribute and CategoryType.
CategoryTypeAttribute entity:
@Entity('category_type_attribute')
...
0
votes
1
answer
55
views
ASP.NET Entity Framework Core - one-to-many relationship foreign key constraint blocking PUT request
I have a relationship on project and employee entities. I need have added a one-to-many relationship using Entity Framework Core (one employee have many projects, but one project has one employee). ...
0
votes
1
answer
35
views
Sprint Boot Jpa Bidirectional Cycle Issue
@ManyToOne
@JoinColumn(name = "TeachersId")
private TeachersEntity teachersId;
@OneToMany(mappedBy = "teachersId",cascade = CascadeType.ALL,fetch = FetchType.LAZY)
@...
1
vote
0
answers
57
views
SQLAlchemy: When to use passive_deletes="all" (with DELETE CASCADE in [e.g.] PostgreSQL)
SQLAlchemy provides a few options for handling "cascaded" deletions - from what I can gather, either the ORM tries to handle cascading itself (i.e., where passive_deletes=False [default] and ...
0
votes
0
answers
24
views
Spring Data JPA | Unable to save child record
I'm having two tables Parent and Child, where child has a reference to Parent. Using Spring Data JPA I'm trying to make entries in these two tables, but Spring inserts record only in Parent table.
...
1
vote
3
answers
27
views
OneToMany Relation errors with org.hibnernate.MappingException Unable to find column with logical name
I than for all support. I read several answers here and on hibernate project, but still get this Exception:
Caused by: org.hibernate.MappingException: Unable to find column with logical name: ...
0
votes
2
answers
28
views
Hibernate @OneToMany FetchType.LAZY is not working
I have a product class and the list of Required stock of products
I am having problems while fetching products from database
@Entity
public class Product {
@OneToMany(mappedBy = "product",...
0
votes
1
answer
20
views
Error with @ManyToOne @OneToMany declarations
Hi, I am starting with a project with TypeScript, TypeORM and Postgres. I made the entities that seems to be correct but I got some errors I do not understand. The problem found is between a ...
1
vote
1
answer
101
views
JPA Two-step OneToMany Hibernate 6
In our team we decided to upgrade from Hibernate 5 to Hibernate 6. We have hundreds of JPA entities in our project. Some of them aren't working any more due to a new validation in Hibernate. I will ...
0
votes
0
answers
22
views
How to perform one to many mapping relationship in MERN
I want to establish a relationship between the user and notes with one to many mapping relationship. But most probably i was getting error only. I don't know about the populate in mongoose in ...
0
votes
1
answer
85
views
How to achieve many-to-many relationship between entities
I'm not sure if my relations between entitites are correct.
So for example I have an Player entity and a Team entity, one player can be in multiple teams(as long as they don't play the same tournament)...