1. One to One Hibernate Annotation forum.hibernate.orgHi I am having two tables. 1) Person (personid varchar2(10), name varchar2(10), contact number(2)) 2) Address (addressid number(2), description varchar2(10)) Java Pojo Objects Person { String personId; String name; Address contactInfo (this is for contact column) public getContactInfo() {} } Address { int addressId; String description; } Note: Person(contact) and Address(addressid) are foreignkey relation Note: Please notice those column names are ... |
2. Many to one Annotations forum.hibernate.orgHi, I have two tables (customers and clients) and for every client there are many customers, my problem is, if i retrieve the customers record, i want to get the client record as well, i want to know how will i do that using many to one annotation or any solution. this is my customer class @Entity @Table(name = "customers", catalog ... |
3. Define NamedNativeQuery return scalar type by annotation forum.hibernate.orgHi There, I'm trying to use @NamedNativeQuery to return a list of BIGINT from MySQL. I'm expecting a List |
4. Hibernate Annotation Configuration forum.hibernate.orgHello all, I am using the AnnotationConfiguration object, for the first time, to startup hibernate. The following code does that: sessionFactory = new AnnotationConfiguration() .addPackage("com.entity") .addAnnotatedClass(Address.class) .addAnnotatedClass(Contact.class) .configure() .buildSessionFactory(); The Address and Contact entities are annotated and are in the com.entity package. The hibernate.cfg.xml file has the following entries: |
5. Hibernate annotations forum.hibernate.org |
6. Annotation : One To many Problem forum.hibernate.orgim having a slight problem with the @OneToMany relationship. According to the docs this approached is not recommended Code: @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER) @JoinColumn(name="CUSTOMER_ADDRESS_ID") But it works! However it creates 2 sql statements instead of one as i found out myself when I turned on showsql property good article here: http://i-proving.ca/space/Technologies/Hibernate/Hibernate+Annotation+Examples/Unidirectional+one-to-many+using+a+Join+Column+-+Hibernate Now I created ... |
7. org.hibernate.annotations.common location for 3.6? forum.hibernate.org |
8. What is JPA Annotation and Hibernate Annotation? forum.hibernate.org |
9. Hibernate 3.5.2 unable to use hibernate annotations. forum.hibernate.orglog4j:WARN No appenders could be found for logger (org.hibernate.cfg.annotations.Version). log4j:WARN Please initialize the log4j system properly. Exception in thread "main" java.lang.ExceptionInInitializerError at persistence.HibernateUtil. |
10. Why 'Annotations Reference Guide doesnt exists in 3.6 doc? forum.hibernate.org |
11. Annotation Documentation forum.hibernate.orgHi guys, I started working on hibernate and found that the XML mapping is so tedious and time consuming. So I prefer to work with annotation than the XML. Since I was reading the Hibernate documentation, in which the examples use XML mapping, I couldn't find the same documentation but that uses Annotation rather than XML. Can I find any such ... |
12. Hibernate annotations without hibernate-core ? forum.hibernate.org |
13. How to implement this scenario using Hibernate annotations forum.hibernate.org |
14. hibernate annotations forum.hibernate.orgHii I am newbie to hibernate. I have a doubt in hibernate annotations.. Hibernate provides data mapping with xmls and with JPA Annotations. Does hibernate has its own annotations without depending on JPA?? I have checked the documentation of hibernate. In chapter 5 they have mentioned like this... Code: 5.1. Mapping declaration Object/relational mappings can be defined in three approaches: ... |
15. Java 1.5 annotations. Where's the action forum.hibernate.org |
16. Annotation support in Hibernate3.0a forum.hibernate.orgAs far as I know it isn't supported, in the 3.0 alpha version anyway. Or, if it is, it isn't documented yet. You might want to take a look at the EJB 3.0 preview that is available on JBoss's Web site. Their implementation of EJB 3.0 entitiy beans is based on Hibernate and uses annotations. |
17. Annotation support? forum.hibernate.orgMichael, I have 3.1M4 and set 5.0 compatibility (there isn't 1.5 compatibilty) - I can't open Man.java, Customer.java - eclipse return too many dialog with 'internal AST error) Have you tried to open Man.java with 3.1M4 ? Emmanuel I haven't IDEA and netbeans haven't too good refactoring (netbeans 4.0 work with this files) regards |
18. Annotations and Dependents with their own Dependents forum.hibernate.orgI have a User class that has a dependent ContactDetails attribute. This ContactDetails attribute also has a dependent Address attribute. I would like to customise the database column names used for this dependent of a dependent Address attribute. The syntax for the @Dependent annotation does not seem to allow for anything but simple @DependentAttributes inside it. I've tried specifying the attributes ... |
19. Hib3-annotations: how to use a not-stored parentobject? forum.hibernate.orgI've this class-structure with a parentobject that has the basics every hibernated object should have in my application (ID, version, etc). Now I don't want to store this objecttype, since it is never actually used, only its subclasses. But I can't figure out how to nicely store the properties of this object in a non-general way, I'd rather not name all ... |
20. Hibernate3 Annotation example ? forum.hibernate.orgHello, Is there any simple standalone example to test Hibernate3+Annotations ? I downloaded the Hibernate3-annotation-beta1 and tried to compile them, no errors at all. But how can test them with a simple client without using JBoss. I want to use Hibernate3 and don't want to use any mapping files, so I choose annotations. This will help me to create a proxy ... |
21. Hibernate3 Annotation forum.hibernate.org |
22. Need help with Hibernate annotations forum.hibernate.orgHi All, I've been using hibernate 2.1.x for a while on Mac OS X. As the first release candidate for Java 5 (Tiger) is available on OS X, i would like to use Hibernate Annotations and Hibernate 3 in our Project on JDK 1.5. I've downloaded hibernate 3 and hibernate 3 annotations beta package. I went through the wiki page, documentation, ... |
23. Hibernate annotations question forum.hibernate.orgHello there! I've just started to use annotations (really I'm creating a pojo and reading the docs so far) and one question I have is: There's the standard EJB3 support and also Hibernate annotations right? I recall from a Gavin's seminar on Rio de Janeiro, he speaking about Hibernate having more "functions" than default EJB3 spec. So my question is, can ... |
24. Hibernate annotations forum.hibernate.org |
25. annotations 3.1 b4 and "Y"/"N" d/b colum forum.hibernate.orgHi, I've been trying to retro-fit an existing app using hibernate+annotations as a learning exercise (though I feel the d/b structure is going to bite me...). Anyhow, I'm having problems with boolean values, which are stored in the database in single character columns ("Y"/"N"). When I run the code, ResultSet's getBoolean is called and I end up with the (expected) exception: ... |
26. Hibernate Annotations for production use forum.hibernate.orgI would like to contribute if I find a bug, but it's not that simple. I am planning an "introduction to hibernate" for the other developers at my company, and i dont think they will be to happy with an unstable framework. I want to convince them of the convenience of hibernate, but I think they will by sceptical if it's ... |
27. Middleten and Hibernate Annotations? forum.hibernate.org |
28. persisting annotations 1-1 example 2.2.5.1 forum.hibernate.orgHas anyone been able to get this example to persist using Hib 3.1 and annontations b7 ? I get the exception below when tryint to save a body instance from the example with the following code (using GeneratorType.AUTO for Body and GenerateType.NONE for Heart): try { Session s = HibernateUtil.currentSession(); s.beginTransaction(); Body b = new Body(); b.setHeart(new Heart()); s.saveOrUpdate(b); s.getTransaction().commit(); } ... |
29. |
30. Hibernate annotations does not work, whats the workaround? forum.hibernate.org |
31. Subselect with Annotations forum.hibernate.org |
32. Annotations in J2SE? forum.hibernate.orgIs it possible to use annotations in plain J2SE-applications? I've gotten the following error messages when I've played around with it: Using @Entity and @Id => compilation error: cannot find symbol Id Using @Entity without @Id => runtime error: Initial SessionFactory creation failed. java.lang.NoClassDefFoundError: javax/persistence/Entity Since I can't imagine anybody would want to use XML files instead of annotations, I guess ... |
33. Annotations in Production? forum.hibernate.orgHey there, Just wondering if there is anyone currently using Hibernate Annotations in any sort of production environment, and what anyones thoughts are on the general stability of the Annotations piece. I've been starting to test some of the functionality and am considering using it for persistence in some areas of an application that I plan to deploy to production, but ... |
34. HibernateService with Annotations forum.hibernate.org |
35. problem with hibernate-annotation forum.hibernate.org |
36. problem with hibernate-annotation forum.hibernate.org |
37. Help Regarding Hibernate Annotation forum.hibernate.org |
38. Compatibility of 3.2.0.cr2 with Annotations 3.1Beta10 ? forum.hibernate.org |
39. bytea with annotations forum.hibernate.orgI am with problem in save images... I saw other solution using bytea, but I don't know how use annotations with it. Hibernate version: 3.0 Mapping documents: @NotNull(message = FramexMessages.FRAMEX_REQUIRED_FIELD) @Lob @Basic(fetch = FetchType.EAGER) public byte[] getArquivoImagem() { return arquivoImagem; } Full stack trace of any exception that occurs: org.hibernate.exception.GenericJDBCException: could not insert: [br.com.atlantico.maragato.cadastrosauxiliares.model.ImagemTO] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:91) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:79) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at ... |
40. Where is hibernate annotations source code?? forum.hibernate.orghi all, I'm using ejb3 in jboss 404.GA I'm getting a classcast exception when I use a java Enum in a query that used to work in a previous version of ejb3/jboss. In an effort to track down where it's happening i'd like to attach the hibernate source code for the annothations but can't seem to find it on sourceforge. Please ... |
41. which Hibernate Annotation to use when i don't want.... forum.hibernate.org |
42. Hibernate Annotations x DTO forum.hibernate.orgAloha let's direct to the problem: @Entity(name="UsuarioEntity") @Table(name="usuario") public class UsuarioEntity implements TransferObject { private Integer cod_usuario; private String nome_usuario; private UsuarioGrupoEntity usuarioGrupoEntity; ...gets and setters... @ManyToOne @JoinColumn(name="cod_usuario_grupo") public UsuarioGrupoEntity getUsuarioGrupoEntity() { return usuarioGrupoEntity; } public void setUsuarioGrupoEntity(UsuarioGrupoEntity usuarioGrupoEntity) { this.usuarioGrupoEntity = usuarioGrupoEntity; } And My TO: public class UsuarioTO implements TransferObject { private Integer cod_usuario; private String nome_usuario; private UsuarioGrupoTO ... |
43. Missing annotations forum.hibernate.org |
44. Annotations Question forum.hibernate.orgSo, I'm fairly new to annotations, and quite frankly fairly new to Hibernate. Anyway, my situation is, I created several classes and successfully annotated them to create the tables that I wanted. Everything worked great. HOWEVER, if I made a change to a class and had to change the annotations in the class, say add a new field, Hibernate dropped my ... |
45. How to Use Hibernate Annotations? forum.hibernate.orgI am using HIbernate3.2.0cr2 with hibernate-anntations-3.2.0 I have the foll . use case : Student ------ Registrar ---------College I am using annotations for specifying many-to-many relationship via the association table "Registrar" Here are the POJOs : Student.java : @Entity @Table(name = "tbl_student") @Inheritance(strategy=InheritanceType.JOINED) public class Student implements Serializable { private static final long serialVersionUID = 1L; private Long id; private String ... |
46. Hibernate Core 3.2.0.RC3 and Hibernate Annotations 3.2.0.RC1 forum.hibernate.orgCaused by: java.lang.NoClassDefFoundError: org/hibernate/loader/custom/SQLQueryReturn at org.hibernate.cfg.annotations.QueryBinder.bindSqlResultsetMapping(QueryBinder.java:293) at org.hibernate.cfg.AnnotationBinder.bindQueries(AnnotationBinder.java:238) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:403) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:353) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:265) ... |
47. Newbie needs help with annotations forum.hibernate.orgNeed help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp [b]Hibernate version:[/b] [b]Mapping documents:[/b] [b]Code between sessionFactory.openSession() and session.close():[/b] [b]Full stack trace of any exception that occurs:[/b] [b]Name and version of the database you are using:[/b] [b]The generated SQL (show_sql=true):[/b] [b]Debug level Hibernate log excerpt:[/b] I'm running hibernate 3.2.0.cr2 and annotations 3.2.0.cr1. I'm trying to understand annotations using the "Annotations User's ... |
48. Undeploy memory leak with annotations-3.2.0-rc1 forum.hibernate.orgHello, I've done a little memory profiling with the latest release and I believe I've found the source of a memory leak. I'm using tomcat 5.5.12, java 1.5.0_06 hibernate core 3.2.0.rc2, hibernate annotations 3.2.0.rc1. Using jProbe, I have several classes remaining on the heap after undeployment and many of them have a path to the gc root pointing to: org.hibernate.validator.ClassValidator, specifically: ... |
49. Hibernate 3.2.0CR4 and Annotations 3.2.0.CR1 unhappy togethe forum.hibernate.org |
50. 'where active=true' possible in annotations? forum.hibernate.org |
51. YesNoType & Annotations forum.hibernate.org |
52. Using annotations vs. hbms forum.hibernate.org |
53. how to do ... with annotations? forum.hibernate.org |
54. EntityListeners annotation IOC forum.hibernate.org |
55. Need help with hibernate annotations forum.hibernate.orgAuthor Message fabien_nisol Post subject: Need help with hibernate annotations Posted: Tue Nov 07, 2006 4:48 pm Newbie Joined: Mon Nov 06, 2006 7:08 pm Posts: 3 Hi, I'm currenly playing around with Hibernate 3.2.0 and Hibernate Annotations I'm currently unable to get my simple Entity to be stored into the database (currently a simple derby database)... The entity ... |
56. SortedMap and Annotations forum.hibernate.org |
57. Hibernate using annotations forum.hibernate.orgHallo, I'm trying to use hibernate with Annotations but I really don't get it to work. :( I started with the tutorial which worked well, but uses the old hbm.xml-files rather than annotations. So I used the Manual to make it use annotations. I added the required libraries, annotated the class with Entity, changed the hibernate.cfg.xml to uste mapping-class and used ... |
58. Hibernate annotations standalone forum.hibernate.org |
59. Using EntityMode.DOM4J with just Annotations forum.hibernate.orgHibernate version: 3.2.1 GA I want to serialize my Business objects (POJO's) to XML. Reading chapter 18 of the documentation explained how to do this, but it uses an XML-mapping file (which I'd rather not use, since I prefer annotations). My first question is: How to retrieve an XML representation of a POJO when I only use annotated classes? If I ... |
60. Using hibernate annotations I get a MappingNotFoundException forum.hibernate.orgNeed help with Hibernate? Read this first: http://www.hibernate.org/ForumMailingli ... AskForHelp When I looked online it said that this was because I had the wrong hibernate version, but I have the latest 3.2 release. I can generate a database schema fine, So I assume that something else is wrong Hibernate version: 3.2.0.cr5 [b]Mapping documents:I use annotations [b]Code between sessionFactory.openSession() and session.close(): public ... |
61. Getting NullPointerException when processing annotations forum.hibernate.orgPage 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message dmacbride Post subject: Getting NullPointerException when processing annotations Posted: Tue Jan 02, 2007 2:21 pm Newbie Joined: Tue Jan 02, 2007 1:15 pm Posts: 3 Location: Toronto, Canada Hi, I've taken the Seam 'Booking' example and ... |
62. hibernate annotation forum.hibernate.orghi, i am using hibernate annotation.but i got error as below during run time. I have annotation.jar .which is latest. Exception in thread "main" java.lang.NoSuchFieldError: sqlResultSetMappings at org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(AnnotationConfiguration.java:166) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:254) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1036) at First.main(First.java:37) class for that is as below. import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EntityResult; import javax.persistence.Id; import javax.persistence.SqlResultSetMapping; import javax.persistence.SqlResultSetMappings; import javax.persistence.Table; // default package // Generated Feb 21, ... |
63. Hibernate Annotations issue forum.hibernate.org |
64. Hibernate Annotation Reference incorrectness code? forum.hibernate.org@Entity() public class Flight implements Serializable { @ManyToOne( cascade = {CascadeType.PERSIST, CascadeType.MERGE} ) @JoinTable(name="Flight_Company", joinColumns = @JoinColumn(name="FLIGHT_ID"), inverseJoinColumns = @JoinColumns(name="COMP_ID") ) public Company getCompany() { ... |
65. New SequenceStyleGenerator with JPA/Hibernate Annotations forum.hibernate.org@GenericGenerator( name = "wikiSequenceGenerator", strategy = "org.hibernate.id.enhanced.SequenceStyleGenerator", parameters = { @Parameter(name = "sequence_name", value = "WIKI_SEQUENCE"), @Parameter(name = "initial_value", value = "1000"), @Parameter(name = "increment_size", ... |
66. One-to-one constrained=true in annotations forum.hibernate.orgI know this is a bit late, but we found that setting optional=false on the @OneToOne annotation did what you're looking for, einnocent. It's the opposite of constrained="true" from HBM, in that this association is required, such that null can never be returned for the association and a proxy is used for lazy loading. |
67. Core 3.2.2 with Annotations 3.3.0 problem on WebLogic 9.1 forum.hibernate.orgHi, I've a little problem when I want to deploy my application on WebLogic 9.1. I think there is a problem whith version compatibility between Core and Annotations. Here is the code that generate the "java.lang.NoSuchMethodError: table" exception : Ejb3Column : ligne 366 Code: column.setSecondaryTableName( col.table() ); The "col" variable is an object of type org.hibernate.mapping.Column which doesn't contain any table() ... |
68. where to place the Hibernate annotation forum.hibernate.org |
69. Hibernate annotations and applet forum.hibernate.orgI know that this has been addressed before but I can't find a satisfying solution. I have a model using Hibernate, DAO and DTO's. I'm using servlets to communicate with an applet. I want to serialize the DTO's from the servlet to the applet and back. But the DTO's is using Hibernate annotations and I can't get this to work. Isn't ... |
70. Avoiding repetitive use of @org.hibernate.annotations? forum.hibernate.orgHi, I've been using Hibernate 3 and the annotations API for a while. While I wish that JPA provided all the functionality that I require, I've ended up making us of a lot of the Hibernate extension annotations, e.g. @OneToMany(mappedBy="_paper") //< Just JPA @org.hibernate.annotations.Fetch(value=org.hibernate.annotations.FetchMode.SUBSELECT) @org.hibernate.annotations.Cascade(value={ org.hibernate.annotations.CascadeType.ALL, org.hibernate.annotations.CascadeType.DELETE_ORPHAN}) @org.hibernate.annotations.Sort(type=org.hibernate.annotations.SortType.NATURAL) @org.hibernate.annotations.BatchSize(size=5) private SortedSet |
71. Is the Hibernate commons annotations source code available? forum.hibernate.org |
72. Annotation Support Needed forum.hibernate.orgHi, I try to implement i18n support and I found this solution in the web: http://www.jroller.com/craiger/entry/po ... _i18n_with It's more or less this: a) you have a table eg. product with the columns: id | name | name_fr | name_de ... b) you create a bo: Code: @Entity @Table(name = "products") public class Product implements Serializable { private ... |
73. Disable storage in row with Lob annotation forum.hibernate.orgHi all When I add the @Lob annotation to entity filed, the created Clob field is generated automatically with "enable storage in Row". Is it possible to instruct hibernate to disable STORAGE IN ROW?? Here is the Hibernate output: Code: CREATE TABLE "PAPRO_BULK" ... |
74. Cannot get Hibernate Annotation to work.... forum.hibernate.orgNewbie Joined: Tue Jan 15, 2008 12:44 pm Posts: 4 Hi folks, I started learning about hibernate annotation and set up a projekt, but I cannot get the code to work. It still asks for thehbm.xml files, and I couldn't find out why... here is the Exception I get: Exception in thread "main" java.lang.ExceptionInInitializerError at de.community.persistence.PersistenceUtil. |
75. Newbie - many-to-one annotation question forum.hibernate.orgAuthor Message PretzelLogic Post subject: Newbie - many-to-one annotation question Posted: Tue Feb 05, 2008 12:34 pm Newbie Joined: Thu Feb 15, 2007 3:32 pm Posts: 10 Hello, I'm having trouble with a many-to-one relationship (see below - getNmlBatch() ). The foreign key on the many is not being recognized. So the insert statement does not contain the foreign ... |
76. Problem with annotation forum.hibernate.orgHi, I'm having a problem using |
77. Javadoc comments and annotations forum.hibernate.org |
78. hibernate annotations in java EE environment forum.hibernate.orgHello, if i deploy all annotated classes with JPA and hibernate extensions in an Java EE server ( and include all hibernate libraries) and model DAO layer with entityManager, will be able to take advantage of hibernate extesion annotations, such as Code: ... @GenericGenerator ( name = "hibernate-increment", strategy = "increment" ) ... @CollectionOfElements ... |
79. Define through annotations. How? forum.hibernate.org |
80. new Annotation() --> java.lang.StackOverflowError forum.hibernate.org |
81. @sqlinsert annotation is not working forum.hibernate.org |
82. @sqlinsert annotation is not working forum.hibernate.org |
83. Configuring a PeristentIdentifierGenerator using annotations forum.hibernate.orgI'm trying to write a custom Id Generator, and it is not clear to me how I specify my generator using annotations. Various examples reference code like the following in XML |
84. How to create out own Annotation forum.hibernate.orgHi I am in new to seam frame work, How to write our own annotation using hibernate annotations. I want to @username annotation, this annotation cheking with username already in database is there in same username it dispaly (User name already exists) how to write this annotation our own, please any body help me. |
85. hibernate annotations + jndi Contains more than the maximum forum.hibernate.orgPage 1 of 1 [ 1 post ] Previous topic | Next topic Author Message pr0grammer Post subject: hibernate annotations + jndi Contains more than the maximum Posted: Thu Oct 09, 2008 11:35 am Newbie Joined: Fri Sep 26, 2008 4:45 am Posts: 17 Hi, I've an application that works fine ... |
86. hibernate annotations + jndi Contains more than the maximum forum.hibernate.orgPage 1 of 1 [ 1 post ] Previous topic | Next topic Author Message pr0grammer Post subject: hibernate annotations + jndi Contains more than the maximum Posted: Thu Oct 09, 2008 11:35 am Newbie Joined: Fri Sep 26, 2008 4:45 am Posts: 17 Hi, I've an application that works fine ... |
87. many to many and annotations forum.hibernate.org |
88. One2Many with Annotation? forum.hibernate.org |
89. Hibernate Annotations for one2one, One2Many and Many2Many forum.hibernate.org |
90. Getting Started With Annotations forum.hibernate.orgI am very new to Hibernate and Annotations and I'm also fairly new to programming. As of now I am simply trying to added a few things into the database and query them. When I do a transaction and add an item into the database, I don't get any errors, but when I query the table for what I added an ... |
91. Hibernate Annotations forum.hibernate.org |
92. Does @Type annotation work forum.hibernate.orgI'm using the @Type annotation right now. (With a couple caveats: on the current project, I'm not generating the DB, and I am not using the @Typedef annotation, but referring to the custom type class directly in the @Type annotation.) I would try to reference the class directly in the @Type annotation and then look to the implementation of the TypeDef ... |
93. Using Annotations forum.hibernate.orgBeginner Joined: Thu Sep 18, 2008 5:18 am Posts: 28 Hi, am generally new on Hibernate and my task is to re-write a component written in Struts to Using hibernate + Spring. I have an fair background on hibernate configurations (Mapping using hbm.xml). But am wondering if its rather better to use EJB3_Hibernate annotations instead of the XML mappings since am ... |
94. Annotation approach for http://www.hibernate.org/118.html#A forum.hibernate.orgCode: @Entity @Table(name = "TABLE_A") public class ClassA { long id; String name; Set |
95. Help with JPA Annotations please. forum.hibernate.orgimport javax.persistence.*; @Entity @Table(name = "SIMPLEUSER") public class SimpleUser { @Id @GeneratedValue @Column(name = "MAIL") private String mail; @Column(name = "USERNAME") private String userName; @Column(name = "PASSWORD") private String password; |
96. Annotations strange behavior forum.hibernate.orgI have code similar to what is below. During runtime, when I do getVersions() it is returning it with the keys of the Map as Integer instead of a String. I can compile, but at Runtime get ClassCastException because I'm expecting a String value instead of Integer. The only thing I can think of is there is a problem and something ... |
97. Annotations : Use @Any / CascadeType.ALL forum.hibernate.orgHibernate Core version: 3.3.1 GA Hibernate Annotation version: 3.4.0 GA Hello, I would like to use CascadeType.ALL or CascadeType.PERSIST for the moment with @Any annotation. This is what I have in my Entity : Please note that I create MyBook directly in getMyObject() for test only :). Of course, MyBook and MyDvd implement MyObject's interface. Code: MyEntity{ ... ... |
98. truncate annotation forum.hibernate.orgHi all, Is it possible to automatically truncate certain fields with an annotation or field within an annotation? I noticed that if I use XML to configure my entities, I can configure truncation if a String is longer than some length. I would like to keep this as an annotation, is this currently possible? Thanks, Walter |
99. Hibernate Core or Hibernate Annotation.. forum.hibernate.org |
100. PrePersist / Annotation Issues forum.hibernate.orgNewbie Joined: Fri May 01, 2009 6:21 pm Posts: 1 Hi, I'm having trouble getting my PrePersist or PreUpdate annotation to fire. My config ~~~~~~~~~~~~~~~~~~~~~~~ JDK=1.6.0_13 Hibernate-dist=3.3.1 Hibernate-annotations=3.4 Hibernate-entitymanager=3.4 ~~~~~~~~~~~~~~~~~~~~~~~~~ my Hibernate.cfg.xml (no orm.xml specified/used): ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |