- This topic has 5 replies, 3 voices, and was last updated 19 years, 1 month ago by Jurgis Jurksta.
-
AuthorPosts
-
wildsoulMemberHello,
I created a simple table “User” and used the “Create hibernate mapping” option. A few seconds later I had two classes:
public abstract class AbstractUser
extends User
implements Serializable {…}public class User
extends AbstractUser
implements Serializable {…}In another few seconds MyEclispse showed me: “Out of memory”.
As you can see there is circular reference, and I suppose that this is the source of the problems. (Another thing, less important is redundant “implements Serializable” in the User class.)
Greetings.
Riyad KallaMemberPlease provide your Eclipse Build ID (Help > About), also your MyEclipse full Version from Window > Preferences > MyEclipse and also the table schemas for your DB.
wildsoulMemberEclipse Build ID: I20050627-1435
MyEclipse ID: 20050829-4.0.0-GASchemas doesn’t matter at all.
I made a fastfix by myself.
A bug is in the template:
[MyEclipse-install-dir]\eclipse\plugins\com.genuitec.eclipse.hibernate_4.0.0\templates\mappedobject.vmMaybe some important issue is, why MyEclipse crashed… but maybe it’s fault of the Eclipse, not your plug-ins.
I have also request about proper camel-case atrib. names, but I put it in the “Hibernate code generation preferences” topic.
Greetings.
Riyad KallaMemberCan you please post what you had to change in order to fix the issue? I’d like to send it back to the DB team to evaluate.
wildsoulMemberSure…
But it’s a fastfix (it’s work for me), but it’s not a final solution.
*** mappedobject.vm.org Mon Sep 5 09:08:50 2005 --- mappedobject.vm Mon Sep 5 09:08:50 2005 *************** *** 17,28 **** * by MyEclipse Hibernate tool integration. */ public abstract class $!{mappedObject.AbstractClassName} - #if ($mappedObject.isSubClass()) - extends ${mappedObject.SuperClassName} implements Serializable - #else - implements Serializable - #end { #if ($mappedObject.hasPrimaryKey()) /** The cached hash code value for this instance. Settting to 0 triggers re-calculation. */ --- 17,23 ----
And if you don’t like redundant “implements Serializable” (I don’t)
*** mappedobjectsub.vm.org Mon Sep 5 09:08:50 2005 --- mappedobjectsub.vm Mon Sep 5 09:08:50 2005 *************** *** 5,11 **** package $!{mappedObject.PackageName}; #end - import java.io.Serializable; /** * A class that represents a row in the '${mappedObject.TableName}' table. --- 5,10 ---- *************** *** 14,20 **** */ public class ${mappedObject.ClassName} extends ${mappedObject.AbstractClassName} - implements Serializable { /** * Simple constructor of ${mappedObject.ClassName} instances. --- 13,18 ----
Greetings.
Jurgis JurkstaMemberHi,
Just wanted to mention that this problem is still present in 4.0.2 GA version.
It is good that I can fix it myself but please fix it in next versions. -
AuthorPosts