one-to-many Questions
4
Solved
I am reading currently the documentation of Hibernate regarding the entity associations and I come accross a little difficulty to figure out some things. It has to do in essence with the difference...
Ezara asked 20/4, 2013 at 10:58
3
I want to delete the parent row if the associated rows in child tables have been removed.
class Child(Base):
__tablename__ = "children"
id = Column(Integer, primary_key=True)
parent_i...
Orvil asked 27/8, 2018 at 18:31
3
Solved
I have two entity classes Country and Language having bi-directional one to many relationship.
Below are the entity classes:
@Entity
@Table(name = "COUNTRY")
public class Country {
@Id
@Genera...
Botchy asked 2/9, 2018 at 7:55
2
Solved
I use Spring Data JPA and MySQL. I have one to many relation between Event and Category. Obviously:
one Event can have only one Category
one Category can be assigned many Events.
The problem appe...
Itinerant asked 1/4, 2013 at 11:8
1
Solved
I have two entities Dept and Emp (real case changed and minimized). There is 1:n association between them, i.e. properties Dept.empList and Emp.dept exist with respective annotations. I want to get...
Lookthrough asked 24/6, 2020 at 11:42
8
Solved
Ok so this is probably a trivial question but I'm having trouble visualizing and understanding the differences and when to use each. I'm also a little unclear as to how concepts like uni-directiona...
Better asked 24/6, 2010 at 21:8
7
Solved
One of the requirements in an application I am building is for a form input that takes in a varying number of items for a single field. For instance, the sports that I play are ('Soccer','Tennis','...
Turoff asked 8/7, 2014 at 9:9
2
Solved
I'm using Spring Data JPA with Spring boot version 1.3.6.RELEASE with in-memory database.
I'm wondering how to paginate the child entities from a parent entity.
Setting fetch to LAZY is not a solu...
Striper asked 28/8, 2016 at 14:2
6
Solved
In the example section of the @OneToMany JPA annotation reference:
Example 1-59 @OneToMany - Customer Class With Generics
@Entity
public class Customer implements Serializable {
...
@OneToMany(...
Chrysalid asked 6/4, 2010 at 11:46
2
Solved
I'm using Spring Boot,REST and JPA to build my application. In app, there are 2 entities with one to many relationship.
Entity 1 :
@Entity
@Table( name = "report")
@JsonIgnoreProperties(ignoreUnk...
Opportunity asked 30/5, 2017 at 13:7
5
Solved
In the class Parent there is a list List. When the parent is saved the children which have been added or changed shall be save / updated by hibernate.
I've found many explanations on this, however...
Ayers asked 10/3, 2012 at 21:48
5
I want to persist parent entity with 20 child entities,
my code is below
Parent Class
@OneToMany(mappedBy = "parentId")
private Collection<Child> childCollection;
Child Class
@JoinCol...
Defecate asked 4/2, 2016 at 10:4
1
Solved
I am coding up a dictionary using Django.
I want a word to have multiple definitions, if necessary.
This would be a one-to-many relationship, but Django does not seem to have a OneToManyField.
Thi...
Lupita asked 11/3, 2020 at 17:8
2
I started using Room database and went through several docs to create room entities.
These are my relations. A Chat Channel can have Many Conversations. So this goes as one-to-many relationship. H...
Melanoma asked 15/2, 2020 at 3:20
9
Solved
I'm using Hibernate with annotations (in spring), and I have an object which has an ordered, many-to-one relationship which a child object which has a composite primary key, one component of which ...
Gree asked 9/4, 2010 at 23:36
5
Solved
I have a problem with generating multiple one-to-many relationship for a model using factories in Laravel. The factories seem to only be generating one ClubFixture per Club, when they should be gen...
Strang asked 2/3, 2018 at 20:27
1
I've created a 'document' entity:
e.g.
@Entity()
export class Document {
@PrimaryGeneratedColumn()
id: number;
@Column()
name: string;
@Column()
path: string;
...
}
Multiple document...
Necessitous asked 25/6, 2019 at 20:21
2
Solved
I have a struct definition in GO like this
package models
//StoryStatus indicates the current state of the story
type StoryStatus string
const (
//Progress indicates a story is currenty being ...
Isley asked 31/1, 2020 at 9:47
5
My Tables:
Product: id, name
Offer: id, value, product_id
Entities:
@Entity
@Table(name="product")
public class Product implements Serializable {
@OneToMany(mappedBy="product")
private Set<...
Amary asked 28/11, 2011 at 20:22
2
Solved
This seems like a common enough case, but as JPA newbie, I am having trouble figuring this out. I'm using EclipseLink and PostgreSQL, but this should relate to just the JPA spec.
I have one table ...
Cornaceous asked 3/8, 2012 at 5:14
4
I have a Garage which contains Cars and Motorcycles. Cars and motorcycles are Vehicles. Here they are:
public class Garage
{
public int Id { get; set; }
public virtual List<Car> Cars { get...
Gerrilee asked 2/1, 2014 at 21:56
2
Solved
I am developing simple API for practice project Online Shopping System. I am totally new in Spring Boot framework and creating API.
I want to return JSON similar to this:
[
{
"id": 1,
"name":...
Meretricious asked 4/4, 2018 at 13:49
1
I have a one-to-many map class - MyMap1N<WeakPtr_Parent,WeakPtr_Children>.
By design, it is supposed to store weak pointers of game-related instance.
Roughly speaking, it is called like :-
...
Bullfrog asked 29/4, 2019 at 7:31
5
I can't seem to resolve my mapping issue; The relationship is one user may have many venues, A venue must have a user.
My venue class looks like:
public class Venue : BaseObject, IBaseObject
{
[...
Fifty asked 23/2, 2014 at 15:10
3
I have a Parent with a OneToMany associations with a Child Table.
I'm trying to write a query with CriteriaBuilder to restrict the results returned from the Child table.
I'm adding a Predicate, s...
Maritime asked 19/3, 2015 at 13:30
© 2022 - 2024 — McMap. All rights reserved.