generate 2 « Development « JPA Q&A





1. hibernate auto-generate classes    forum.hibernate.org

Hey guys, I am using the hibernate tool "hbm2java" to convert the hbm files to java domain files. I want to override the equals() method in about 20 of these hbm classes. However, once I write the equals() methods, and then rerun the 'hbm2java' tool this will over-write my current changes. What is a work-around for this? Any recommendations? Thanks.

2. Multiple generated timestamps    forum.hibernate.org

Greetings, I've been looking for a way to use hibernate to insert DB-generated datetime/timestamp data in more than one column. The scenario is that there are several tables in a legacy system which have both "Created Date" and "Updated Date" columns, which are populated with the DMBS time (SYSDATE in this case, as it's Oracle 8i) on insert or update, respectively. ...

3. Ignoring generated value    forum.hibernate.org

On my entities I have the id generated using the uuid generator: @Id @GeneratedValue(generator="system-uuid") @GenericGenerator(name="system-uuid",strategy="uuid") This allows me to have id's guaranteed to be unique across environments (dev/stage/prod). However, I also want the ability to move my data across environments and still maintaining id's. The problem I have is that if I migrate an object which has the id set and ...

4. Hibernate Tool Code Generation    forum.hibernate.org

5. Hibernate Tool Code Generation    forum.hibernate.org

6. getResultList generates duplicate rows    forum.hibernate.org

select customdata0_.top_node_id as top1_54_, customdata0_.custom_data_key as custom3_54_, customdata0_.node_type_code as node2_54_ from custom_data_application customdata0_ where ...

7. XDoclet 2 with Hibernate 3 - no file generated    forum.hibernate.org

Newbie Joined: Thu Apr 17, 2008 3:46 pm Posts: 5 Hi I'm using xDoclet 2 with HIbernate 3. I'm trying to get a simple file generated based on http://www.hibernate.org/338.html. Here is my class: Code: package com.abc.def.domain; import java.io.Serializable; /* * @hibernate.class table = "country" */ public class Country implements Serializable { static final long serialVersionUID = 5895819393L; private ...

8. cglib generating SecurityException    forum.hibernate.org

Hi, im new to hibernate and i used it in my java application, im working with netbeans and well, when i run the app on netbeans all works great... the thing is that i need to deploy in other machines .. and when i try to use the jar file i got this (Im also using spring): Caused by: java.lang.SecurityException: class ...





10. Need suggestions for code generation    forum.hibernate.org

I'm not sure about you guys, but I frequently find myself in the middle of maintaining a huge list of artifacts during a web application development. These artifacts include database tables, hibernate objects, hibernate mapping files and DAOs. More often than not, I have to change a chain of artifacts when some aspect of the application design gets changed. I know ...

11. Auto generated index name too long    forum.hibernate.org

Hibernate version: 3.2.5 Hi, I have an hbm file which contains hierarchy of several classes using while only the concrete classes are abstract=false. The top class in the hierarchy has a property which is indexed (index="i_1"). The depth of the hierarchy is about 6 classes which as I mentioned before only the concrete classes have tables. The problem I'm facing ...

12. How To Generate Protected members?    forum.hibernate.org

Hi all, How can I reverse engineer my tables so the members are protected instead of private? This must be a common thing: we often regenerate our tables, and I have to manually add any derived fields, which is very time consuming. I'd prefer to extend from the generated model and put my derived fields there, so I can easily replace ...

13. How do I generate protected members    forum.hibernate.org

14. generate DML statements dynamically in hibernate    forum.hibernate.org

15. Problem with classes generation    forum.hibernate.org

16. generate testdata    forum.hibernate.org





17. Question on CGILIB generated class varaible???    forum.hibernate.org

18. Customize XML Generation Using Hibernate Tool    forum.hibernate.org

19. customize generation using template    forum.hibernate.org

20. Generating Values for EmbeddedId Variables    forum.hibernate.org

21. Issue in GENERATED ALWAYS    forum.hibernate.org

Hi, I have a table and it has a column with GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, CACHE 20, NO MINVALUE, NO MAXVALUE, NO CYCLE, NO ORDER) .The table data in that column (Generated always) are not in sequencly ordered,For example values are 20,25,26,28,31 etc instead of 20,21,22,23,24 etc . I appreaciate your help on this.

22. Issue in GENERATED ALWAYS    forum.hibernate.org

Hi, I have a table and it has a column with GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, CACHE 20, NO MINVALUE, NO MAXVALUE, NO CYCLE, NO ORDER) .The table data in that column (Generated always) are not in sequencly ordered,For example values are 20,25,26,28,31 etc instead of 20,21,22,23,24 etc . I appreciate your help on this.

24. Code Generation tools for Hibernate JPA.    forum.hibernate.org

The Hibernate Tools project has some great utilities, so that's always the first place to check. But as you probably know, they deal more with hbm files than annotations. Sometimes though, it's a nice start having the hbm files, know they're working, and using them as a template to move towards JPA stuff.