1. Another JPA Question stackoverflow.comI have this code:
But when I use this:
|
2. How to use Hibernate @Any-related annotations? stackoverflow.comCould someone explain to me how Any-related annotations ( |
3. Hibernate Annotation Placement Question stackoverflow.comI've got what I think is a simple question. I've seen examples both ways. The question is - "why can't I place my annotations on the field?". Let ... |
4. Hibernate annotations, autoincrement related stackoverflow.comi am using hibernate annotations, at the back end i am using Postgres SQL 8.3. So, i don't know how to apply sequence in annotations of my Class. Plz provide related help ... |
5. Hibernate (with annotations) - how to get started stackoverflow.comI'm trying to get started with hibernate, but I can't find any tutorials I understand. I'm trying to create a simple app to get started, but I've really no idea where to ... |
6. Does JasperReports/iReport work with Hibernate annotations? stackoverflow.comI'd like to integrate existing application with JasperReports. However, when creating report with iReport the wizard is asking me for hibernate.hbm.xml. Since I'm using annotations I simply don't have one. Does ... |
7. A question on @IdClass JPA Annotation stackoverflow.comHeres a composite primary key for one of my entities.
|
8. what are annotations in hibernate? stackoverflow.combriefly, can someone tell me what an annotation is in hiberate? (java) is it a way to quickly map entities to tables? |
9. Annotations of Annotations in Java 5/6 stackoverflow.comI am setting up Hibernate Caching and want to cache certain entities in different regions. For example, some entities can be "stale" for up to 5 minutes, some for an hour, ... |
10. Yet another Hibernate question stackoverflow.comMy application is trying to use Hibernate annotations. I've gotten the 3.5.0 version of Hibernate installed, but when I try to load my app I get the following exception:
|
11. Persisting large files with Hibernate Annotations stackoverflow.comI am using Hibernate Annotations for the first time in my web application. In my bean, what type what annotations should I use to persist files uploaded by users? |
12. Annotations: methods vs variables stackoverflow.comI was always sure (don't know why) that it's better to add annotations to variables, but while browsing the Hibernate doc http://docs.jboss.org/hibernate/stable/annotations/reference/en/html_single/#entity-hibspec-collection I noticed they tend to annotate the ... |
13. How-to dynamically fill a annotation stackoverflow.comSadly, I forgot to take the code from work with me today. But maybe this little example will clarify things. I use hibernate to map a bean to a table. Example:
|
14. Hibernate not JPA compliant regarding @Access? stackoverflow.comAccording to my JPA 2.0 book (and online documentation), I should be able to mix field and property access within a single entity or entity hierarchy. The annotation of |
15. Can annotation be added to decelerations stackoverflow.comCan we add annotations to the decelerations instead to the getter methods. I'm used to this
Can we use it like ... |
16. Where to put hibernate annotations? stackoverflow.comWhere do i put my hibernate annotations? Is it the line above my instance variable? Or before the getter? Or before the setter? Or doesn't it really matter? Thanks a lot |
17. Hibernate usage in a Servlet environment stackoverflow.comI'm trying to create a domain object that contains objects in a read-only fashion but be able to modify which objects it points to. So in the example below I would like ... |
18. Hibernate Annotations and SQL Server stackoverflow.comI'm using Hibernate Annotations and trying to save an object. But when saving object I get:
The thing is that in my SQL Server ... |
19. question about hibernate annotations stackoverflow.comi have 2 entities: User and Role i have one class Userrole that will contain a composite key between user and role. now Userrole will not contain userId and roleId.. but the object ... |
20. Hibernate with JPA annotation problem - lazy object stackoverflow.comI have a USER table associated with many other tables, in general, star topology. Like this:
|
21. Hibernate Views using Annotations stackoverflow.comLearned that it is possible to write a |
22. Hibernate annotations using @PrimaryKeyJoinColumn stackoverflow.comI am using hibernate annotations in my application. But I am getting one problem. class A
|
23. Calculating and storing precomputed average with Hibernate stackoverflow.comSay I have a set of products and each product has a set of reviews. Each review has a score. I will need the average of the scores much more often ... |
24. Understanding Annotation Processing in Java stackoverflow.comCan someone describe the use of annotation processing? |
25. Hibernate: Issue with OnDelete Annotation stackoverflow.comHello I have the following two entities
And:
|
26. Hibernate one to many with annotations stackoverflow.comHi guy's i'm very new to hibernate and i have to use annotations also.I have two POJO classes one is having the fields id1,description in which id is the primary key ... |
27. Does @Loader work correctly on annotations (using JPA)? stackoverflow.comThis is a somewhat contrived example meant to show a point. Here are two entity classes linked by a relationship and a named query:
|
28. Where can I get Hibernate Annotations from? stackoverflow.comI have just started reading a Hibernate book and it says go to Hibenrate.org and download both HibernateCore and Hibernate Annotations ..well I am at the website and cannot find Hibernate ... |
29. Annotations Hibernate 3.5 stackoverflow.comThe below annotation works when applying it to the field: @OneToMany(targetEntity=TestMany.class, cascade=CascadeType.ALL, fetch=FetchType.EAGER) ... |
30. Link to Hibernate Annotation download stackoverflow.comI wanted to download the Hibernate Annotation Module at the hibernate website but I cant seem to find where the jar files are located. I only see below links . How build a session ... |
35. Hibernate annotations double[] stackoverflow.comWhat is the correct annotation to persist a double[] in hibernate? e.g. private double[] myData; Thanks. |
36. is it possible to skip presisting certain instance of object via annotation based on some condition? stackoverflow.comThe title is a bit of mouthful Let's say we have a collection of values object (say quantity of some goods in stock). When I call
I want it to automatically skip ... |
37. Well known JSR-269 ("Pluggable Annotation Processing API") users besides JPA 2.0? stackoverflow.comThe JSR 269 - "Pluggable Annotation Processing API" - has been released 2006. Since then the only well-known use of this API has been the metamodel generation of JPA ... |
38. Relative persistence unit inject? stackoverflow.comI have a Persistence.xml with multiple persistence-unit definition file exists. I want to inject unit EntityManager object, according to the user who entered the system. Is it possible?
In this ... |
39. If I want to use hibernate with Annotation, do I have to use javax.persistence.*? stackoverflow.comI know hibernate is an implementation of JPA, and also has its own features. I'm trying to use hibernate with annotations, but I found I have to use some annotations under ... |
40. hibernate annotations coderanch.comHi Sir! I'd like to ignore the traditional mapping files, and use only the new annotation based entity mapping in my next hibernate project. I have checked hibernate org, and find an alpha release of hibernate annotations(and an ejb3 early acces lib inside). Do you think i could use this stuff right now for simple mappings, or wait until the new ... |
41. annotations and reflection in Hibernate coderanch.com |
42. Hibernate Annotations coderanch.comHibernate annotations seem to be very interesting and I am trying to use the hibernate-tools starting from a domain model. The unfortunate thing is that I can generate my ddl using hbm2ddl proper proper, but there doesn't seem to be a way to use hbm2java without hbm files. I am willing to make my own DAO velocity templates as long as ... |
43. Hibernate Annotations coderanch.com |
44. Hibernate Annotations - Are they intrusive? coderanch.comWhen I was reading "Hibernate in Action", I liked the idea that when using Hibernate, POJOs need not implement any hibernate specific interface. The meta data describing mapping of POJO attributes and database columns are maintained outside code in .XML files. With the introduction of Hibernate Annotations, in Hibernate 3.2 onwards, its now possible to express the mapping metadata using Annotations. ... |
45. How to use hibernate annotations? coderanch.comMaybe, but Edward hasn't asked homework assignments before, so I am easily going to assume that it is not. To use Hibernate Annotations you just need Hibernate 3.x and Java 5.0 SDK. Annotations are Java's way of adding the features you had originally gotten from XDoclet. They take the form of @Annotation before class definition, attributes and methods of classes. By ... |
46. Hibernate Annotations coderanch.com |
47. JPA Hibernate Annotations coderanch.comHello I Use hibernate and I get use to map the class with xml files I have mapped interface that use joined-subclass to map his class implementation and it works very well. See below |
48. Hibernate Annotations coderanch.com |
49. Hibernate Annotations coderanch.comMy scja.com website, uses Hibernate with JPA annotations running on a Tomcat server. No EJBs are used at all. It's not a complex site, with most of the data being pushed and pulled to provide some mock SCJA exam questions, but it's Hibernate and JPA doing the work. That's one of the promises of Hibernate and to a lesser extent, JPA ... |
50. Hibernate 3 Annotations coderanch.comI am trying to create a One to Many Relationship between two tables Orders and OrderLineItems. I am not sure what is the mistake i am doing. Can anybody tell me what is the problem with the following code. The Scenario says One Orders can have more then one OrderLineItems Order Class: public void setOrderLineItems(List |
51. Hibernate Annotation Yes/No coderanch.comI have a database column with number(1) which stores 0/1/null values. 1)While displaying the values in the page I have to get yes for 1, no for 0 and blank for null. 2)While displaying the values in the page I have to get Retail for 0, Corporate for 1 and blank for null. Is it possible in the hibernate using annotations ... |
52. Hibernate Annotations -- NamedQueries coderanch.comI've been trying to establish some named queries in my application using Hibernate Annotations. I've been placing the named query annotation on my Repository classes, but they don't seem to be picked loaded. From reading the documentation I'm beginning to get the impression that the @NamedQueries is only parsed if the class also has an @Entity annotation (rather than the @Transactional ... |
53. Hibernate Annotation with Native Hibernate coderanch.comI love the power of annotation, but I don't like to fully use JPA since it's not as powerful as native Hibernate. For some reason, I don't really care about portability. I'm just wondering if there's anyone here using Hibernate annotation with native Hibernate. Is this kind of approach widely used in companies? |
54. What is wrong with this Hibernate annotation? coderanch.comHello guys! I'm beginning with Hibernate and I read a tutorial, telling how to do one-to-many relation using annotations. Exactly what I wanted to know. It's very simple: one course has many students. //All imports correctly @Entity public class Course { @Id @GeneratedValue private int id; private String name; private int duration; @OneToMany(mappedBy="course", fetch=FetchType.LAZY) @Cascade(CascadeType.ALL) private Collection |
55. difference between jpa Annotations and Hibernate Annotations coderanch.comOne costs absolutely $0 and the other is free. One is a Specification and one has annotations beyond JPA. Basically Hibernate implements the JPA spec and also adds more features above th spec. so the Hiberate specific Annotations are those added features. So you use JPA annotations until you come across a mapping that forces you to use Hibernate specific features, ... |
56. Hibernate with annotations - One-to-many question coderanch.com |
57. moving to hibernate annotations coderanch.comHi All, We currently have a Hibernate ORM implementation using the earlier approach of (cfg+hbm xml) files. We are now planning to move towards annotations. I understand for tables all the declarations in the hbm xml files will go as annotations in the POJO class. How are the cfg settings moved to annotations. Also are annotations alternative available for all tasks ... |
58. Transformation to hibernate Annotation coderanch.comI was using traditional mapping file in hibernate. Now I changed to hibernate annotations. So I created hibernate.cfg.xml and entity class. @Entity @Table(name = "tb_users") @NamedQueries({@NamedQuery(name = "TbUsers.findAll", query = "SELECT t FROM TbUsers t")}) public class TbUsers implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Basic(optional = false) @Column(name = "pki_user_id") private Integer pkiUserId; ... |
59. Learning Hibernate Annotations coderanch.com |
60. Hibernate annotations problem coderanch.comI am trying to use Hibernate annotations for mapping and I get following error: org.hibernate.AnnotationException: Cannot find the expected secondary table: no servers available for annotated.Server Here is my code: |
61. Hibernate annotations and JPA coderanch.com |
62. JPA Annotations in Hibernate 2.0 coderanch.com |
63. Problem using Annotations in hibernate coderanch.compublic class HibernateUtil { private static final SessionFactory sessionFactory; static { try { // Create the SessionFactory from hibernate.cfg.xml sessionFactory = new AnnotationConfiguration().addPackage("events"). addAnnotatedClass(Person.class).addAnnotatedClass(Events.class).configure().buildSessionFactory(); } catch (Throwable ex) { // Make sure you log the exception, as it might be swallowed System.err.println("Initial SessionFactory creation failed." + ex); throw new ExceptionInInitializerError(ex); } } public static SessionFactory getSessionFactory() { return sessionFactory; } } ... |
64. Hibernate with annotations problems coderanch.comHello all, I am trying to configure a hibernate java project using annotations and I am getting the following error: org.postgresql.jdbc2.Jdbc2DatabaseMetaData.supportsGetGeneratedKeys()Z I have the following jars in my project: C:\Program Files\Java\jre1.6.0_07\lib\resources.jar C:\Program Files\Java\jre1.6.0_07\lib\rt.jar C:\Program Files\Java\jre1.6.0_07\lib\jsse.jar C:\Program Files\Java\jre1.6.0_07\lib\jce.jar C:\Program Files\Java\jre1.6.0_07\lib\charsets.jar C:\Program Files\Java\jre1.6.0_07\lib\ext\dnsns.jar C:\Program Files\Java\jre1.6.0_07\lib\ext\localedata.jar C:\Program Files\Java\jre1.6.0_07\lib\ext\postgresql-8.3-603.jdbc2.jar C:\Program Files\Java\jre1.6.0_07\lib\ext\sunjce_provider.jar C:\Program Files\Java\jre1.6.0_07\lib\ext\sunmscapi.jar C:\Program Files\Java\jre1.6.0_07\lib\ext\sunpkcs11.jar C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\antlr-2.7.6.jar C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\commons-collections-3.1.jar C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\dom4j-1.6.1.jar C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\javassist-3.9.0.GA.jar C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\jta-1.1.jar C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\lib\required\slf4j-api-1.5.8.jar C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-distribution-3.3.2.GA\hibernate3.jar C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-annotations-3.4.0.GA\hibernate-annotations.jar C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-annotations-3.4.0.GA\lib\ejb3-persistence.jar C:\Users\Gunnar\Documents\Text\Java\Hibernate\hibernate-annotations-3.4.0.GA\lib\hibernate-commons-annotations.jar ... |
65. Content based discrimination with Hibernate annotations coderanch.comHi folks, I am curious on an issue pertaining content based discrimination with Hibernate annotations. I've set up my entities with annotations. From an abstract base class using single table inheritance, a couple of sub-classes add some fields and use a secondary table for storing their data. Each of these sub-classes is furthermore extended by (sub-)sub-classes that simply have a different ... |
66. Pro JPA 2: Mastering the Java Persistence API - Annotaions coderanch.com |
67. moving from JPA standard annotations to pure hibernate annotations coderanch.comAll, We have a project wherein we use Hibernate as our ORM layer. We started using Annotations and got to know the Annotations we used were all JPA standard annotations. We want to change this to use pure Hibernate based Annotations. Is this task just a change of fully qualified package names from javax.*.* to org.hibernate.*.* Let me know your thoughts ... |
68. Why do we use Hibernate annotations? coderanch.com |
69. Hibernate annotation variable coderanch.comHi, I have a VO class which is mapped with a database table using annotation. However, i need to have another member variable in the class which does not have a mapping in table. This is because i need to combine two values in this class to display as another field. I guess i cannot use hbm since one of my ... |
70. Hibernate Annotations coderanch.comHi all, I'm trying to move my project to Annotations and I've downloaded the latest Hibernate distribution (3.6.0 final). I created a very simple annotated class and I'm trying to add it programmatically by doing this: conf.configure().addAnnotatedClass(com.store.model.Book.class); This is in the documentation of the release. But I'm getting a compiler (!!!) error: The method addAnnotatedClass(Class |
71. Simple hibernate annotation example problem coderanch.comHi, I have copied an simple hibernate example from website, every thing compiles fine when i rum i get the following error. "Initial SessionFactory creation failed.java.lang.NoSuchFieldError: sqlResultSetMappings Exception in thread "main" java.lang.ExceptionInInitializerError at net.roseindia.HibernateUtil. |
72. Hibernate with annotation coderanch.com |
73. Hibernate and annotations liferay.comHi, I want to develop a portlet using hibernate. My portlet works fine, when I use a xml-file for mapping. But now I want to change the mapping to annotations. I added the annotations to the bean and I modified the hibernate.cfg.xml, so that hibernate uses annotations. But it does not work. Is there anything else I have to modify? |
74. Source for Hibernate annotations forum.hibernate.org |
75. Persisting inhiretance with annotations forum.hibernate.orgHi all I was trying to use hibernate annotations for the first time. I have created three classes: BaseEntity, Org and Chaine. Both Org and Chaine extends BaseEntity. public class BaseEntity { @Column(name= "name") private String name; @Id private Integer id; } @Entity @Table(name="chaine") public class Chaine extends BaseEntity { } @Entity @Table(name = "Org") public class Org extends BaseEntity { ... |
76. Does Hibernate 3.2 w/ Annotations 3.3.1 defaults to sequenc? forum.hibernate.orgHi all, We have an application with a huge volume of concurrent inserts and out of a sudden performance started to degrade on certain scenarios (which are still not that clear). Anyways, after taking a thread dump on the WebSphere instance the application is running and analysing it on ISA we noticed that there were many (monitor) locks on an instance ... |
77. Annotations - could not initialize proxy forum.hibernate.org |
78. one to one annotations forum.hibernate.orgThat is good post..well i am having a problem and it is driving me nuts. i have a scenario in which each product it link to some other product. table = product id (primary key), link(pointing to id) this link can and cannot be null.its kind of parent child relation in one table..after searching and found nothing i thought may b ... |
79. annotations for enumerations forum.hibernate.org |
80. Annotations - general questions forum.hibernate.orgHey guys, I have a few general questions regarding annotations. [*] How do Hibernate annotations relate to javax annotations? When should I use which? [*] Are annotations preferred now to hbm.xml files? [*] What is required to have Hibernate annotations running (what kind of server etc. or no server perhaps?) Best, Mikey |
81. Help with annotation forum.hibernate.orgHi, I'm using Hibernate 3.3.2.GA with an Oracle 10g database. In my Oracle table, "USER_LOGINS", I have a column, SUBVENDOR_ID, that can be NULL, but if it contains a number, that would link to the primary key of another table, named "SUBVENDOR". However, right now the Subvendor object is not getting loaded into my UserLogin model. I suspect my annotation can ... |
82. Where do I have to place the annotations? forum.hibernate.orgHi, do I have to place the annotation like @Id, @GeneratedValue, etc. in front of the class-attribute or do I have to annotate the corresponding getter-method? My book says that I have to annotate the getter-methods but I had some problems with that so I tried to use the other way by annotating the attribute and it worked perfectly so I'm ... |
83. Autogenerating hibernate annotations....? is it possible? forum.hibernate.org |
84. Hibernate Annotations forum.hibernate.orgHi. i'm new to Hibernate Annotations please help me.? I want create the one-to-many relationship with two tables only . For eg I have configured through hbm.xml its fine what i expected : |
85. Hibernate Annotations forum.hibernate.org |
86. the Problem with hibernate annotation many-to-many forum.hibernate.orghave pojo class A and B public class A { @Id @GeneratedValue private Integer id; private String name; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @ManyToMany(cascade={CascadeType.MERGE,CascadeType.PERSIST} ) @JoinTable(name="a_b", joinColumns={@JoinColumn(name="a_id")}, inverseJoinColumns={@JoinColumn(name="b_id")} ) private List bs; public List getBs() { return bs; } public void setBs(List bs) { this.bs = bs; } public String ... |
87. SequenceGenerator with Hiberante annotation doesn't work... forum.hibernate.org |
88. @Loader annotation not working forum.hibernate.org |
89. Annotation Scanner forum.hibernate.orgAt runtime I want to get a list of all the @Entity classes. When Hibernate loads it will read the classes from the persistence.xml file, or maybe it will scan the classpath. Either way, hibernate discovers all the @Entity objects. Is there a way for me to access a Collection extends @Entity> from hibernate at runtime after hibernate has already loaded ... |
90. Hibernate Annotations forum.hibernate.orgBeginner Joined: Mon May 10, 2010 2:00 pm Posts: 21 I am getting this error: org.hibernate.exception.SQLGrammarException: could not get next sequence value I am using Netbeans IDE 6.9 full release. I have an Account class and am trying to insert the class. The problem is that Hibernate is looking for a sequence object in my Oracle database. I do not have ... |
91. Hibernate - Annotations or Mappingfile forum.hibernate.orgI would say the answer would be ... yes. In other words, I personally prefer using both. I like using annotations to show relationships, but I would avoid specifying database-specific information in your annotations, like table and column names, for instance. This will result in some redundant information, which is obviously a disadvantage. It also means that many of your annotations ... |
92. Hibernate Envers - reverse @RevisionEntity annotation forum.hibernate.orgHi all, Is it possible to reverse the annotation, @RevisionEntity, instead of putting it on the RevisionEntity and indicating what listener to use, I'd like to put it on the revision listener itself and indicate which revision entity to use. Since the listener is dependent on the entity, the relationship shows that more clearly this way. Also, it lets you pull ... |
93. Visible of Annotations forum.hibernate.org |
94. Hibernate Common Annotations -- Release 3.5.x? forum.hibernate.org |
95. Hibernate annotations forum.hibernate.orgHi, I created a table in MySQL: 'object_label' with columns 'id' and 'name'. I inserted values to this table. In java I created new class -'ObjectLabel': Code: @Entity @Table(name = "object_label") public class ObjectLabel implements Serializable { private ... |
96. Why Hibernate annotations? forum.hibernate.org |
97. @any annotation for Java forum.hibernate.orgBased on the documentation I can find it does not appear that the @any functionality is available as an annotation for Java. I am using JAXB with Hibernate and do not have the ability to use the XML |
98. With Annotations retrieving records forum.hibernate.orgAuthor Message kotapati.krishna Post subject: With Annotations retrieving records Posted: Fri Sep 24, 2010 10:09 pm Newbie Joined: Tue Jul 20, 2010 1:53 am Posts: 18 I can't retrieving the records ..?For below code. //Client.java(Session obj,Factory obj . . .) import java.util.*; import java.io.*; import org.hibernate.*; import org.hibernate.cfg.*; //import org.hibernate.connection.*; public class Client { public static void main(String[] args)throws ... |
99. jboss6 M5 Hibernate @Any annotation forum.hibernate.org20:33:14,667 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=cm.war#primary state=Create: java.lang.UnsupportedOperationException: any not supported yet at org.hibernate.ejb.metamodel.AttributeFactory.determineAttributeMetadata(AttributeFactory.java:452) [:3.5.5-Final] at org.hibernate.ejb.metamodel.AttributeFactory.buildAttribute(AttributeFactory.java:93) [:3.5.5-Final] at org.hibernate.ejb.metamodel.MetadataContext.wrapUp(MetadataContext.java:183) [:3.5.5-Final] at org.hibernate.ejb.metamodel.MetamodelImpl.buildMetamodel(MetamodelImpl.java:66) [:3.5.5-Final] at org.hibernate.ejb.EntityManagerFactoryImpl. |
100. Question about Hibernate, Annotation and JPA forum.hibernate.orgHello all, Im learning Hibernate and have a very simple question. what's the relationship between Hibernate and JPA? In my opinion, "pure" hibernate use XML metadata and hibernate native API, they are strong but not obey EJB3 specification. "pure" EJB3 use JPA Annotation (or JPA XML metadata), and JPA API, but they can only be used in an EJB3 Application Server ... |