mappedsuperclass

Value of 0 in Hibernate IndexColumn mapped with base=1

We are using Hibernate Annotations 3.4.0GA and Hibernate Core 3.3.2.GA (also known as the current stable versions) against an Oracle database We have a One-to-Many mapping with base=1 which worked fine for a loooong time, yet last week we found some entries in the database where the index column contained a value of 0 which caused all k...

EclipseLink @MappedSuperclass and generics.

I have a few domain model classes in my web app that have a hierarchical relationship to themselves. An example of one is the hierarchical category structure used to classify users postings. There is some logic relating to the hierarchical nature of these classes that is common. So I tried to move the logic into a generic @MappedSupercl...

Applying annotations to fields inherited from @MappedSuperclass

Has: @MappedSuperclass class Superclass { @Id @Column(name = "id") protected long id; @Column(name="field") private long field; } and @Entity class Subclass extends Superclass { } How to annotate inherited id with @GeneratedValue and field with @Index within Subclass? ...

Hibernate: how to fetch only not-logically deleted objects

Nearly every table in our database has a FK to the Auditing table which logs created, updated and deleted status (date and username). We mapped the auditing table to the Auditing class and use it like this: @MappedSuperclass public class BusinessObject extends DataObject { private static final long serialVersionUID = -114781101039594...