one-to-many Questions

2

Solved

I have many relations of this type, but I can't see why this one is not working. I have a Delegation and a Promotion entities: Delegation Promotion /** * Company\CBundle\Entity\Promotion * ...
Dissect asked 10/1, 2013 at 15:39

1

Im working in a backend API using Java and MySql, and I'm trying to use @SqlResultSetMapping in JPA 2.1 for mapping a ONE-TO-MANY native query result into a POJO class, this is the native query: ...
Eidolon asked 24/12, 2017 at 8:37

0

I'm using JPA to define a datamodel for a database with composite keys. I cannot change the database. I have got a Car entity with a composite key (carType and carId). A second (optional) Porsche...
Jealous asked 24/1, 2019 at 13:20

4

Solved

I have users, and users belong to a dealership. Upon user registration, I'm trying to save a new user, and a new dealership. User database has a dealership_id column, which I want to be populat...
Ellipticity asked 22/4, 2014 at 19:41

6

Solved

I think I misunderstood the meaning of cascading in the context of a @ManyToOne relationship. The case: public class User { @OneToMany(fetch = FetchType.EAGER) protected Set<Address> use...
Welloiled asked 23/10, 2012 at 9:21

1

I want to handle "one-to-many" relation using Android Room. I easily can fetch related entities using @Relation[1]. According to [2][3], there isn't native support for @Relation insert in Room. In ...
Owades asked 14/11, 2018 at 13:23

4

Solved

I'm creating a simple REST application with dropwizard using JDBI. The next step is to integrate a new resource that has a one-to-many relationship with another one. Until now I couldn't figure out...
Deficiency asked 20/6, 2014 at 23:34

2

Solved

These are my models and serializers. I want a representation of Question Model along with a list of people the question was asked to. I am trying this: @api_view(['GET', 'PATCH']) def questions_b...

1

Solved

I have an Object with a List of another object. It's mapped like this: @Entity @Inheritance(strategy = InheritanceType.JOINED) @Table(name = "products") public class Product extends DateAudit { p...
Asuncionasunder asked 28/7, 2018 at 5:50

1

Solved

I have the following entity: public class Level { public int LevelId { get; set; } public int? ParentLevelId { get; set; } public string Name { get; set; } public virtual Level Parent { get; ...

1

Solved

In my WebAPI web app, I've added a varbinary(max) field to a table, and a byte[] field to the POCO (BatchCharge). This entity has a child entity (Charge). Visual Studio 2013, Entity Framework 6, ...

1

Solved

I'm trying to learn Go and Gorm by building a little prototype order management app. The database is MySQL. With simple queries Gorm has been stellar. However, when trying to obtain a result set in...
Halfslip asked 6/3, 2016 at 0:57

10

Solved

Please advice me How to remove "Create and Edit..." from many2one field.? that item shows below in the many2one fields which I filtered with domain option. OpenERP version 7
Gourmand asked 26/3, 2013 at 5:33

1

Solved

How to set the column name of the foreign key when setting up a one-to-many relationship in JPA? I would like to change the name of "items_id" to "item_id" @OneToMany private List<Item> ite...
Arlenearles asked 6/4, 2018 at 20:3

3

Solved

So, I have the following entities: @Entity public class Supplier { @Column(name = "SUPPLIERID") private BigInteger supplierId; @OneToMany @JoinColumn(name = "ID_SUPP", foreignKey = @ForeignKe...
Daemon asked 14/1, 2015 at 9:7

3

Solved

I got two models in Laravel: Label class Label extends \Eloquent { protected $fillable = [ 'channel_id', 'name', 'color', ]; public function channel() { return $this->belongsTo('App\Ch...
Hames asked 8/12, 2017 at 16:8

1

Solved

I have a simple one-to-many relationship in Django, for example: class Team(models.Model): team_mascot = models.CharField( max_length=200, null=True) class Player(models.Model): first_name =...
Tomasz asked 28/11, 2017 at 16:53

3

Solved

I have a Department entity which relations are as follows: Many departments can be in one parent department: @ManyToOne @JoinColumn(name = "ik_parent_department_id") private Department parentDep...
Quotable asked 23/11, 2011 at 13:56

5

Solved

i have a Question about referencing ParentEntities from Child Entites ir If i have something like this: Parent.java: @Entity(name ="Parent") public class Parent { @Id @Generate..... @C...
Locomotive asked 2/3, 2012 at 12:55

2

I have the following scenario @Entity public class Parent { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) private Long id; @Column(name = "name", nullable = false) private String na...
Kimura asked 13/2, 2015 at 13:55

2

Solved

I have a superclass Questions and its subclass MultipleChoiceQuestions Superclass has a field activity I want to create a Set<MultipleChoiceQuestions> and use OneToMany annotation using map...
Oar asked 15/12, 2010 at 7:21

1

Solved

I have a JPA entity (Person) with onetomany relation (ContactInfo). @Entity public class Person { @Id @GeneratedValue private Integer id; private String name; private String lastname; priva...
Penury asked 31/8, 2017 at 18:27

2

Solved

Problem I would like to start by saying that I realize the database structure is atrocious, but I cannot change it at this point in time. That being said, I have the need to create a one-to-many,...
Issacissachar asked 7/6, 2013 at 17:25

2

Solved

I have three classes one of the names is User and this user has other classes instances. Like this; public class User{ @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL) public List<A...
Pasteup asked 11/12, 2012 at 0:45

1

Solved

Say I want to design a system where users can create posts, where each post belongs to one user but a user may have multiple posts. Also assume I want to support finding all posts given a userID in...
Mallorie asked 10/7, 2017 at 20:26

© 2022 - 2024 — McMap. All rights reserved.