-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: on a complex schema, query results in a "OutOfMemoryErr
PostPosted: Tue Oct 19, 2004 8:40 am 
Newbie

Joined: Thu Sep 30, 2004 9:41 am
Posts: 1
Hibernate version:
hibernate 2.1.2
Mapping documents:
actually i have a schema about 450 relations! Hibernate can form the mapping files very well. Also can generate the .java files. But when i try to execute a hql query it gives an error(OutOfMemoryError)
Here is one of the mapping file:

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping>
<!--
Created by the Middlegen Hibernate plugin 2.1

http://boss.bekk.no/boss/middlegen/
http://www.hibernate.org/
-->

<class
name="org.compiere.hibernatemodel.AD_CLIENT"
table="AD_CLIENT"
>

<id
name="AD_CLIENT_ID"
type="long"
column="AD_CLIENT_ID"
>
<generator class="assigned" />
</id>

<property
name="AD_ORG_ID"
type="long"
column="AD_ORG_ID"
not-null="true"
length="10"
/>
<property
name="ISACTIVE"
type="java.lang.String"
column="ISACTIVE"
not-null="true"
length="1"
/>
<property
name="CREATED"
type="java.sql.Timestamp"
column="CREATED"
not-null="true"
length="7"
/>
<property
name="CREATEDBY"
type="long"
column="CREATEDBY"
not-null="true"
length="10"
/>
<property
name="UPDATED"
type="java.sql.Timestamp"
column="UPDATED"
not-null="true"
length="7"
/>
<property
name="UPDATEDBY"
type="long"
column="UPDATEDBY"
not-null="true"
length="10"
/>
<property
name="VALUE"
type="java.lang.String"
column="VALUE"
not-null="true"
length="80"
/>
<property
name="NAME"
type="java.lang.String"
column="NAME"
not-null="true"
unique="true"
length="120"
/>
<property
name="DESCRIPTION"
type="java.lang.String"
column="DESCRIPTION"
length="510"
/>
<property
name="SMTPHOST"
type="java.lang.String"
column="SMTPHOST"
length="120"
/>
<property
name="REQUESTEMAIL"
type="java.lang.String"
column="REQUESTEMAIL"
length="120"
/>
<property
name="REQUESTUSER"
type="java.lang.String"
column="REQUESTUSER"
length="40"
/>
<property
name="REQUESTUSERPW"
type="java.lang.String"
column="REQUESTUSERPW"
length="40"
/>
<property
name="REQUESTFOLDER"
type="java.lang.String"
column="REQUESTFOLDER"
length="40"
/>
<property
name="AD_LANGUAGE"
type="java.lang.String"
column="AD_LANGUAGE"
length="6"
/>
<property
name="WEBDIR"
type="java.lang.String"
column="WEBDIR"
length="120"
/>
<property
name="ISMULTILINGUALDOCUMENT"
type="java.lang.String"
column="ISMULTILINGUALDOCUMENT"
not-null="true"
length="1"
/>
<property
name="ISSMTPAUTHORIZATION"
type="java.lang.String"
column="ISSMTPAUTHORIZATION"
not-null="true"
length="1"
/>
<property
name="DOCUMENTDIR"
type="java.lang.String"
column="DOCUMENTDIR"
length="120"
/>
<property
name="WEBPARAM1"
type="java.lang.String"
column="WEBPARAM1"
length="4000"
/>
<property
name="WEBPARAM2"
type="java.lang.String"
column="WEBPARAM2"
length="4000"
/>
<property
name="WEBPARAM3"
type="java.lang.String"
column="WEBPARAM3"
length="4000"
/>
<property
name="WEBPARAM4"
type="java.lang.String"
column="WEBPARAM4"
length="4000"
/>
<property
name="WEBORDEREMAIL"
type="java.lang.String"
column="WEBORDEREMAIL"
length="120"
/>
<property
name="WEBINFO"
type="java.lang.String"
column="WEBINFO"
length="4000"
/>
<property
name="WEBPARAM6"
type="java.lang.String"
column="WEBPARAM6"
length="4000"
/>
<property
name="WEBPARAM5"
type="java.lang.String"
column="WEBPARAM5"
length="4000"
/>
<property
name="ENCRYPTIONKEY"
type="java.lang.String"
column="ENCRYPTIONKEY"
length="510"
/>
<property
name="ISUSEBETAFUNCTIONS"
type="java.lang.String"
column="ISUSEBETAFUNCTIONS"
not-null="true"
length="1"
/>

<!-- Associations -->

<!-- bi-directional one-to-many association to FACT_ACCT -->
<set
name="FACT_ACCTs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.FACT_ACCT"
/>
</set>
<!-- bi-directional one-to-many association to C_UOM_CONVERSION -->
<set
name="c_UOM_CONVERSIONs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_UOM_CONVERSION"
/>
</set>
<!-- bi-directional one-to-many association to C_CALENDAR -->
<set
name="c_CALENDARs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_CALENDAR"
/>
</set>
<!-- bi-directional one-to-many association to C_ELEMENTVALUE -->
<set
name="c_ELEMENTVALUEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_ELEMENTVALUE"
/>
</set>
<!-- bi-directional one-to-many association to AD_PRINTFORM -->
<set
name="AD_PRINTFORMs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_PRINTFORM"
/>
</set>
<!-- bi-directional one-to-many association to AD_WF_NODENEXT -->
<set
name="AD_WF_NODENEXTs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_WF_NODENEXT"
/>
</set>
<!-- bi-directional one-to-many association to M_WAREHOUSE -->
<set
name="m_WAREHOUSEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.M_WAREHOUSE"
/>
</set>
<!-- bi-directional one-to-many association to AD_MENU -->
<set
name="AD_MENUs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_MENU"
/>
</set>
<!-- bi-directional one-to-many association to M_SUBSTITUTE -->
<set
name="m_SUBSTITUTEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.M_SUBSTITUTE"
/>
</set>
<!-- bi-directional one-to-many association to AD_SEQUENCE_AUDIT -->
<set
name="AD_SEQUENCE_AUDITs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_SEQUENCE_AUDIT"
/>
</set>
<!-- bi-directional one-to-one association to AD_CLIENTINFO -->
<one-to-one
name="AD_CLIENTINFO"
class="org.compiere.hibernatemodel.AD_CLIENTINFO"
outer-join="auto"
/>
<!-- bi-directional one-to-many association to C_ACCTSCHEMA -->
<set
name="c_ACCTSCHEMAs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_ACCTSCHEMA"
/>
</set>
<!-- bi-directional one-to-many association to C_PERIOD -->
<set
name="c_PERIODs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_PERIOD"
/>
</set>
<!-- bi-directional one-to-many association to AD_ORG -->
<set
name="AD_ORGs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_ORG"
/>
</set>
<!-- bi-directional one-to-many association to AD_TABLE_ACCESS -->
<set
name="AD_TABLE_ACCESSes"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_TABLE_ACCESS"
/>
</set>
<!-- bi-directional one-to-many association to AD_PROCESS_ACCESS -->
<set
name="AD_PROCESS_ACCESSes"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_PROCESS_ACCESS"
/>
</set>
<!-- bi-directional one-to-many association to C_CONVERSION_RATE -->
<set
name="c_CONVERSION_RATEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_CONVERSION_RATE"
/>
</set>
<!-- bi-directional one-to-many association to C_COUNTRY -->
<set
name="c_COUNTRies"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_COUNTRY"
/>
</set>
<!-- bi-directional one-to-many association to AD_REF_LIST -->
<set
name="AD_REF_LISTs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_REF_LIST"
/>
</set>
<!-- bi-directional one-to-many association to C_REGION -->
<set
name="c_REGIONs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_REGION"
/>
</set>
<!-- bi-directional one-to-many association to M_STORAGE -->
<set
name="m_STORAGEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.M_STORAGE"
/>
</set>
<!-- bi-directional one-to-many association to AD_MESSAGE -->
<set
name="AD_MESSAGEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_MESSAGE"
/>
</set>
<!-- bi-directional one-to-many association to AD_WINDOW -->
<set
name="AD_WINDOWs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_WINDOW"
/>
</set>
<!-- bi-directional one-to-many association to AD_VAL_RULE -->
<set
name="AD_VAL_RULEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_VAL_RULE"
/>
</set>
<!-- bi-directional one-to-many association to C_ACCTSCHEMA_ELEMENT -->
<set
name="c_ACCTSCHEMA_ELEMENTs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_ACCTSCHEMA_ELEMENT"
/>
</set>
<!-- bi-directional one-to-many association to AD_TAB -->
<set
name="AD_TABs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_TAB"
/>
</set>
<!-- bi-directional one-to-many association to AD_SEQUENCE -->
<set
name="AD_SEQUENCEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_SEQUENCE"
/>
</set>
<!-- bi-directional one-to-many association to C_NONBUSINESSDAY -->
<set
name="c_NONBUSINESSDAYs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_NONBUSINESSDAY"
/>
</set>
<!-- bi-directional one-to-many association to AD_REFERENCE -->
<set
name="AD_REFERENCEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_REFERENCE"
/>
</set>
<!-- bi-directional one-to-many association to AD_WORKFLOW -->
<set
name="AD_WORKFLOWs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_WORKFLOW"
/>
</set>
<!-- bi-directional one-to-many association to GL_JOURNALLINE -->
<set
name="GL_JOURNALLINEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.GL_JOURNALLINE"
/>
</set>
<!-- bi-directional one-to-many association to M_LOCATOR -->
<set
name="m_LOCATORs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.M_LOCATOR"
/>
</set>
<!-- bi-directional one-to-many association to AD_SEQUENCE_NO -->
<set
name="AD_SEQUENCE_NOs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_SEQUENCE_NO"
/>
</set>
<!-- bi-directional one-to-many association to AD_TASK -->
<set
name="AD_TASKs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_TASK"
/>
</set>
<!-- bi-directional one-to-many association to AD_WORKFLOW_ACCESS -->
<set
name="AD_WORKFLOW_ACCESSes"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_WORKFLOW_ACCESS"
/>
</set>
<!-- bi-directional one-to-many association to FACT_ACCT_BALANCE -->
<set
name="FACT_ACCT_BALANCEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.FACT_ACCT_BALANCE"
/>
</set>
<!-- bi-directional one-to-many association to AD_WF_NODE -->
<set
name="AD_WF_NODEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_WF_NODE"
/>
</set>
<!-- bi-directional one-to-many association to C_CITY -->
<set
name="c_CITies"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_CITY"
/>
</set>
<!-- bi-directional one-to-many association to C_PROJECT -->
<set
name="c_PROJECTs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_PROJECT"
/>
</set>
<!-- bi-directional one-to-many association to AD_COLUMN -->
<set
name="AD_COLUMNs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_COLUMN"
/>
</set>
<!-- bi-directional one-to-many association to C_YEAR -->
<set
name="c_YEARs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_YEAR"
/>
</set>
<!-- bi-directional one-to-many association to C_CURRENCY -->
<set
name="c_CURRENCies"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_CURRENCY"
/>
</set>
<!-- bi-directional one-to-many association to C_UOM -->
<set
name="c_UOMs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_UOM"
/>
</set>
<!-- bi-directional one-to-many association to C_BPARTNER -->
<set
name="c_BPARTNERs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_BPARTNER"
/>
</set>
<!-- bi-directional one-to-many association to AD_TASK_ACCESS -->
<set
name="AD_TASK_ACCESSes"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_TASK_ACCESS"
/>
</set>
<!-- bi-directional one-to-many association to AD_TASKINSTANCE -->
<set
name="AD_TASKINSTANCEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_TASKINSTANCE"
/>
</set>
<!-- bi-directional one-to-many association to C_BPARTNER_LOCATION -->
<set
name="c_BPARTNER_LOCATIONs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_BPARTNER_LOCATION"
/>
</set>
<!-- bi-directional one-to-many association to AD_PREFERENCE -->
<set
name="AD_PREFERENCEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_PREFERENCE"
/>
</set>
<!-- bi-directional one-to-many association to M_PRODUCT_PO -->
<set
name="m_PRODUCT_POs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.M_PRODUCT_PO"
/>
</set>
<!-- bi-directional one-to-many association to AD_WF_PROCESS -->
<set
name="AD_WF_PROCESSes"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_WF_PROCESS"
/>
</set>
<!-- bi-directional one-to-many association to AD_WINDOW_ACCESS -->
<set
name="AD_WINDOW_ACCESSes"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_WINDOW_ACCESS"
/>
</set>
<!-- bi-directional one-to-many association to AD_ROLE -->
<set
name="AD_ROLEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_ROLE"
/>
</set>
<!-- bi-directional one-to-many association to M_PRODUCT -->
<set
name="m_PRODUCTs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.M_PRODUCT"
/>
</set>
<!-- bi-directional one-to-many association to C_VALIDCOMBINATION -->
<set
name="c_VALIDCOMBINATIONs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_VALIDCOMBINATION"
/>
</set>
<!-- bi-directional one-to-many association to AD_TABLE -->
<set
name="AD_TABLEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_TABLE"
/>
</set>
<!-- bi-directional one-to-many association to AD_LANGUAGE -->
<set
name="AD_LANGUAGEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_LANGUAGE"
/>
</set>
<!-- bi-directional one-to-many association to AD_REF_TABLE -->
<set
name="AD_REF_TABLEs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_REF_TABLE"
/>
</set>
<!-- bi-directional one-to-many association to C_ELEMENT -->
<set
name="c_ELEMENTs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_ELEMENT"
/>
</set>
<!-- bi-directional one-to-many association to AD_FIELD -->
<set
name="AD_FIELDs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_FIELD"
/>
</set>
<!-- bi-directional one-to-many association to AD_USER -->
<set
name="AD_USERs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_USER"
/>
</set>
<!-- bi-directional one-to-many association to C_LOCATION -->
<set
name="c_LOCATIONs"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.C_LOCATION"
/>
</set>
<!-- bi-directional one-to-many association to AD_USER_ROLES -->
<set
name="AD_USER_ROLES"
lazy="true"
inverse="true"
cascade="none"
>
<key>
<column name="AD_CLIENT_ID" />
</key>
<one-to-many
class="org.compiere.hibernatemodel.AD_USER_ROLES"
/>
</set>

</class>
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():
actually I intend to use just QueryTranslator class of the hibernate. I won't use the hibernate for saving or loading persistent objects.
Here is my usage intention of hibernate:

QueryTranslator qt = new QueryTranslator(
"select adclient.name from AD_CLIENT as adclient");
HashMap map = new HashMap();
//map.put("Event","EVENTS");

try {
qt.compile((SessionFactoryImplementor) (new Configuration()
.configure().buildSessionFactory()), map, false);
System.out.println("SQL==>" + qt.getSQLString());
} catch (Exception e) {
System.out.println("!!!!!!!!!!!!!EXCEPTION!!!!!!!!!!!!!!");
System.out.println(e.getMessage());
}
Full stack trace of any exception that occurs:

log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
java.lang.OutOfMemoryError
Exception in thread "main"

The mapping files seem to be correct except varchar sql types are mapped to java.lang.Object instead of java.lang.String. Also is there a way to specify the preferred data types. (There is a file whose name is <your_package_name>prefs.properties. One can specify column types here. but i have a lot of tables(450). So i can't set their type values one by one on hand. Is there a way to tell hibernate:"map the sql varchar type to java.lang.String" )

Name and version of the database you are using:
Oracle 9.1.0.2(Oracle 9i)
The generated SQL (show_sql=true):
can't generate sql because of exception
Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject: Re: on a complex schema, query results in a "OutOfMemor
PostPosted: Tue Oct 19, 2004 10:17 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
morak wrote:
Hibernate version:
hibernate 2.1.2
Mapping documents:
actually i have a schema about 450 relations! Hibernate can form the mapping files very well.


Hibernate doesn't automatically make mapping files - Middlegen does.
Please read both manuals for these products!

Quote:
Code between sessionFactory.openSession() and session.close():
actually I intend to use just QueryTranslator class of the hibernate. I won't use the hibernate for saving or loading persistent objects.



And querying is not loading of objects !?
And why are you using an internal class of the API ? why don't you just use session.createQuery() and thus be sure that everything is done as expected ?

Quote:
Full stack trace of any exception that occurs:

log4j:WARN No appenders could be found for logger (net.sf.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
java.lang.OutOfMemoryError
Exception in thread "main"


Not much help when you don't even have configured your logging system properly.

Quote:
The mapping files seem to be correct except varchar sql types are mapped to java.lang.Object instead of java.lang.String.


I did not see any java.lang.Object references in your mapping ? They were all java.lang.String!?

Basically you seem to be using hibernate for the very first time and you even chose to NOT use the public API, but some internal class you *think* does what you do (instead of acutally using the api that is used in ALL DOCUMENTATION!? which you apperently haven't read...)

So basically please read & understand the basic docs....

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.