super « Map « JPA Q&A





1. Hibernate ManyToMany and superclass mapping problem    stackoverflow.com

I need to create a relation in Hibernate, linking three tables: Survey, User and Group. The Survey can be visible to a User or to a Group, and a Group is form ...

2. Hibernate Mapped Superclass relationships and overriding    stackoverflow.com

I have an abstract MappedSuperClass, Participant, which is extended by three kinds of 'Participant'. Each one then uses its own kind of 'Project', also an abstract MappedSuperClass. However, I want the ...

3. Hibernate, single table inheritance and using field from superclass as discriminator column    stackoverflow.com

I have following kinds of classes for hibernate entity hierarchy. I am trying to have two concrete sub classes Sub1Class and Sub2Class. They are separated by a discriminator column (field) that ...

4. JPA (and inheritance) how do I get all entities of a given superclass    stackoverflow.com

Given the following entity definitions:

@Entity
class abstract A {
    Collection<A> parents;
}


@Entity
class B extends A {

}


@Entity
class C extends A {

}
is it possible to define a method which returns all entities ...

5. Multiple ManyToMany relationships using "mappedBy" with Super class member    stackoverflow.com

I am developing an application using Hibernate and am trying to model the following scenario: I have an Activity Abstract class, defined as follows:

@Entity
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="activityType")
@Table(name = "BF_ACTIVITY")
public abstract class Activity extends PersistableObject {

 ...

6. Hibernate query on superclass property    stackoverflow.com

First of all, please forgive my ignorance in both Java and Hibernate, I'm studying different ORM solutions and am not a Java programmer. 1) Is it possible to map the following class ...

7. Hibernate - Many-to-Many relationship in superclass not inherited    coderanch.com

Hi Guys, I have a Hibernate mapping files like the below. When I retrieve a Purchase Order(my super class) I get back a list of Catologs aswell. But when Invoice (subclass) is retrieved I do not get back a list of asscociated catolgs. The sub class does retrieve all other inherited properties. What could this problem be? Anything to do with ...

8. entity not mapped when saving superclass    forum.hibernate.org

I have an entity which a few classes extend. The extended classes do not have any Entity annotations (or xml etc). So I save an extended class expecting that the only annotated entity is saved. My intention is to use some of the extended properties during gui operations which never need to be saved. Can I achieve this (I already tried ...

9. Configure a combined, inherited index on a mapped superclass    forum.hibernate.org

i want to create an index with multiple columns on a mapped superclass. The default way in hibernate is the hibernate extension to @table that contains an indexes property. my problem is that the mapped superclass is abstract and has 10 classes that need to inherit the index. That means in my database are 10 tables that require this index. Since ...





10. can I make a map super lazy ?    forum.hibernate.org

11. super interface as member of subinterface impl mapping    forum.hibernate.org

[b]Hibernate version:[/b] 3.0.5 Hello Hibernate Experts! I have the following heirarchy (adapted from AppFuse) and have been struggling with the mapping file(s). My goal is a MinimalUser-centric system with decorators (E.G. Model is a decorator), as well as "aspects" (E.G. PictureSet), and I don't want repeated data in the DB (I have soutions that violate these preferences, but I am looking ...

13. Multiple Inheritance with Interfaces and Superclass    forum.hibernate.org

Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Set, for columns: [org.hibernate.mapping.Column(inhalt)] at org.hibernate.mapping.SimpleValue.getType(SimpleValue.java:266) at org.hibernate.mapping.SimpleValue.isValid(SimpleValue.java:253) at org.hibernate.mapping.Property.isValid(Property.java:185) at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:440) at org.hibernate.mapping.RootClass.validate(RootClass.java:192) at org.hibernate.cfg.Configuration.validate(Configuration.java:1102) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287) at de.nordakademie.schnak.util.HibernateUtil.(HibernateUtil.java:13) ... 1 more

15. Mapping a concrete class whose superclass contains id    forum.hibernate.org

I have been working on a set of domain objects that inherit from an abstract class that needs to have knowledge of the identifier's get and set methods. For example: Code: ConcreteClass extends AbstractClass { int id; public int getId() { return id; } public void setId(int id) { ...

16. Virtual Mapping to invoke the SuperClass    forum.hibernate.org