many-to-one Questions

1

Solved

I’m trying to map the inheritance from the superclass LendingLine and the subclasses Line and BlockLine. LendingLine has an ManyToOne association with Lending. When I try to get the LendingLines ...
Humphreys asked 27/4, 2016 at 10:29

2

Solved

I'm having problems when saving entities in my DB. I have something like (very simplified) : @Entity public class Building { @OneToMany(mappedBy = "building", fetch = FetchType.EAGER) private...
Oxus asked 20/1, 2016 at 10:22

3

Following thread [entities cannot be cast to javassist.util.proxy.Proxy, i do have now a server side error ( tks thomas) I wasn't able to face the real problem within my app. java.lang.ClassCastEx...
Particia asked 30/1, 2014 at 11:16

9

I've got those two classes MyItem Object: @Entity public class MyItem implements Serializable { @Id private Integer id; @ManyToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE}) private...
Hedrick asked 11/5, 2012 at 11:29

1

I am frequently associating a vote entity in other ones with symfony2 / doctrine 2. This is done through a manyToOne relationship. I was considering using a trait to include the association and it...
Congenital asked 17/2, 2015 at 15:1

1

Solved

In my auditable entities I have field creationUser which I would like to not update in db on merge operation. Here is my entity code: @Column(updatable=false) @ManyToOne(cascade = CascadeType.ME...
Trachyte asked 28/4, 2015 at 10:40

1

Solved

I'm using JPA 2.1 and Hibernate 4.3.7 I tried to tuned my app so I turn relationships to lazy and fetch only what I need them I have a problem with the many-to-one relationships, when turn to laz...
Ootid asked 31/3, 2015 at 16:1

2

I'm trying to select the matching row in the product_item_sortorder table based on a productId and toolboxItemId from the product_item table. In normal SQL that would be for a given productId: SE...
Reitz asked 8/4, 2011 at 8:32

2

I am new to Symfony and Doctrine. I have an entity "User" and an entity "Type". One user can have one favorite type and one type can have many users that have that specific type as favorite. So I ...
Infralapsarian asked 27/9, 2014 at 2:27

2

Solved

I'll simplifly my code, I have te next: Doctor entity: use ...\...\Entity\Paciente; class Doctor extends Usuario { public function __construct() { ... $this->pacientes = new ArrayCollec...
Puncture asked 20/2, 2013 at 11:48

1

Solved

I am trying to get my @OneToMany and @ManyToOne relationships correct. Class 1: @Entity public class IdeaProfile { @Id @GeneratedValue private int ideaProfileId; private String name; Date date...
Trim asked 23/3, 2014 at 13:44

2

Solved

According to book Pro JPA 2 the main difference between unidirectional @ManyToOne and @OneToOne is that in @OneToOne: Only one instance of the source entity can refer to the same target entity i...
Rhyne asked 14/2, 2014 at 21:23

3

Solved

I did a small application with more relationships. Now I want to delete details of my table how can I delete I don't get any Idea to delete. Relationships are like below: PanCard-->Employee (On...
Caulfield asked 5/2, 2014 at 6:18

3

I am doing Many To One relationship using JPA . While deleting child object from Child table it's throwing exception. Below is My code: Project.java @Id @GeneratedValue(strategy=GenerationType...
Starbuck asked 4/2, 2014 at 6:44

1

Solved

Let's first describe my situation. I am using Symfony2 and I have a problem with a relationship between my entities. I have two entities that are linked together. The two entities are AssociationQ...
Alpheus asked 30/1, 2014 at 0:19

2

Solved

Suppose there is an abstract model CarOwner: whereas a Person or a Business can be a CarOwner. In addition a Car with a certain VIN can belong (relate) to either a Person or a Business, but not bot...

3

I'm trying to create a UniqueEntity with 2 fields (both are ManyToOne fields). The code is as follow: /* * @ORM\Table() * @ORM\Entity * @ORM\HasLifecycleCallbacks() * @UniqueEntity(fields={"user"...
Poleaxe asked 11/6, 2012 at 16:12

2

Solved

So, this is my first time learning computer language. And I chose python and django. Now, I got many of the basic concepts of python and also django. I can create new page with the views and all ot...
Neilson asked 28/10, 2013 at 17:59

1

My New Project is in Hibernate 4.2.5.Final and Spring. After Login, I am storing the user object in the session. Now after successful login, I need to insert one record in the application lo...

2

Solved

I am using Hibernate 3.3.1 and i would like to create a relation between persons and an assigned company. They should be loosely coupled, but i would like to arrange to create a company via cascade...
Compliancy asked 20/8, 2013 at 21:54

1

Solved

I am trying to set up some ManyToOne/OneToMany relationships on objects in my database using Doctrine (2.2.3+) via Symfony2 (2.3.0) and am getting a strange error. Here are the relevant parts of th...
Dealing asked 11/7, 2013 at 0:39

1

User have n Contacts. A Contact can have a localized Comment (Comments are shared between Contacts). Java Beans: @Audited @Entity public class User { @OneToMany(fetch = FetchType.EAGER, cascade ...
Somaliland asked 27/1, 2012 at 12:30

3

Solved

I've inherited a hibernate application and I've run into issues. It seems that the code does not save the child in a One-To-Many relationship. It's bidirectional, but on save of parent object, it d...
Unalloyed asked 7/11, 2012 at 2:11

1

Solved

I have a m:n relationship book - borrow - user, the borrow is the join table. The tables are given (can not be changed): on one side they are used by jdbc app as well. on the other side i would ...
Recital asked 21/7, 2012 at 21:38

2

Solved

Even though my question is worded specifically to the way Entity relationships are depicted in the Play framework, which uses Hibernate, I am sure this is a general concept. When we have a one-to-...
Jiggermast asked 20/12, 2011 at 7:18

© 2022 - 2024 — McMap. All rights reserved.