auto « Annotation « JPA Q&A





1. How to auto generate names for @Index annotation?    stackoverflow.com

The @Index annotation in Hibernate requires the name attribute, however I don't want to specify one in a mapped superclass:

import javax.persistence.MappedSuperclass;
import org.hibernate.annotations.Index;
...

@MappedSuperclass
class Article {

    // @Index   ...

2. Auto-detect annotated entities, in classpath?    forum.hibernate.org

3. Annotations, auto_increment, generatedvalue help needed,    forum.hibernate.org

Hi! please, i need some assistance... I have two entities - users, and events... there is many-to-many relationship... Code: @Entity @Table(name="events") public class Event { @Id @Column(name="event_id") private int id; private String title; public Event(){ this.id = 0; ...

4. Need help with auto generated primary keys and annotations    forum.hibernate.org

Hi , We are currently eliminating the use of .hbm file and using annotated objects reverse engineered from the database using hibernate-tools I want to use such a sequence generator with org.hibernate.annotations.GenericGenerator and prefer that it is automatically generated while the object is being reverse engineered.But I am not sure how to go about it. [code] ...

5. Annotation for auto-import="false"    forum.hibernate.org

I am sure this would solve the issue, but I was wondering what if 3rd party jars are involved, where I cannot change the code. I had an understanding two entities with same name may exists in different persistent-units. But this is not working in my case. Is my understanding incorrect or its a bug? Please help. I have entity name ...