table-per-class Questions

3

I'm trying to create a inheritance with TABLE_PER_CLASS strategy, but i want to have different primary key for each table is it possible? I've one class Register which has millions of instances, s...
Kermanshah asked 7/11, 2017 at 2:5

1

Solved

I have the following mapping: @Entity @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) public abstract class Vehicle { @Id @GeneratedValue Long id; } @Entity @Table(name = "car") @Attr...
Agate asked 16/1, 2018 at 15:10

2

i have the following scenario public abstract class BaseClass { public virtual int Id {get; set}; public virtual string Name {get; set;} } public class FirstSubClass : BaseClass { //propertie...

0

Could somebody explain why InheritanceType.TABLE_PER_CLASS could not use the GenerationType.AUTO strategy for primary key value generation when mapping inheritance?

1

I have model like: public abstract class Entity { public int Id { get; set; } } public abstract class Tree : Entity { public Tree() { Childs = new List<Tree>(); } public int? Pare...
Bala asked 10/4, 2014 at 9:16

2

Solved

I am using the table per subclass strategy in Grails by setting the tablePerHierarchy property of the static mapping field in my superclass to false. This way, Grails creates one table for my super...

2

Solved

I'm using EclipseLink as the JPA provider. Further I'm using the following TABLE_PER_CLASS inheritance structure @javax.persistence.Entity @Inheritance(strategy = InheritanceType.TABLE_PER_CLASS) ...
Jellyfish asked 23/11, 2010 at 13:17

1

Solved

I'm using Hibernate JPA. Suppose I have these classes: AbstractPerson |--> ConcreteEmployee |--> ConcreteCustomer Is there any way to make the concrete classes have independent IDs? I'm ...
Estabrook asked 1/7, 2010 at 1:57
1

© 2022 - 2024 — McMap. All rights reserved.