-->
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.  [ 4 posts ] 
Author Message
 Post subject: Problems generating the POJOs from table
PostPosted: Fri Feb 17, 2006 7:35 pm 
Newbie

Joined: Mon Jun 20, 2005 11:07 am
Posts: 16
Hibernate version:3.1
Hibernate Tools version:HibernateTools-3.1.0.beta3
Database:Firebird 1.5

Hi everyone. I'm trying to generate a simple Schema from the POJOs, from a Firebird Schema. The tables are something like this:
Quote:
Table - TIPO_LEITO_TLT
ID_TLT
DESCRICAO

Table - LEITO_LTO
ID_LTO
ID_TLT
NUMERO


This is the revenge.xml:

Quote:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd" >

<hibernate-reverse-engineering>
<type-mapping>
<sql-type jdbc-type="BIGINT" hibernate-type="java.lang.Long" length="11"/>
<sql-type jdbc-type="VARCHAR" hibernate-type="java.lang.String"
length="80" />
<sql-type jdbc-type="FLOAT" hibernate-type="java.lang.Double" length="6"/>
<sql-type jdbc-type="TIMESTAMP" hibernate-type="timestamp" length="17"/>
</type-mapping>
<table-filter match-name="TIPO_LEITO_TLT" />
<table-filter match-name="LEITO_LTO" />
<table-filter match-name="ANUNCIO_ANU" exclude="true" />
<table-filter match-name="ANUNCIO_IMAGENS_ANI" exclude="true" />
<table-filter match-name="IMAGENS_IMG" exclude="true" />
<table-filter match-name="LEITO_IMAGENS_LTI" exclude="true" />
<table-filter match-name="TARIFARIO_TRF" exclude="true" />
<table-filter match-name="TIPO_IMAGEM_TPM" exclude="true" />

<table name="TIPO_LEITO_TLT">
<primary-key>
<generator class="increment"></generator>
<column name="ID_TLT" jdbc-type="BIGINT" property="id"
type="java.lang.Long" />
</primary-key>
<column name="DESCRICAO" jdbc-type='VARCHAR'
property="descricao" type="java.lang.String" />
</table>
<table name="LEITO_LTO">
<primary-key>
<generator class="increment"></generator>
<column name="ID_LTO" jdbc-type="BIGINT" property="id" type="java.lang.Long"/>
</primary-key>
<column name="ID_TLT" jdbc-type='BIGINT' property="idTipoLeito" type="java.lang.Long"/>
<column name="NUMERO" jdbc-type='VARCHAR' property="numero" type="java.lang.String"/>
</table>
</hibernate-reverse-engineering>


And this is the exception in Eclipse when I try to generate:

Quote:
Exception while generating code

Reason:
org.hibernate.console.HibernateConsoleRuntimeException: Could not create or find with one argument delegate constructor

Could not create or find with one argument delegate constructor
java.lang.ClassNotFoundException:
java.lang.ClassNotFoundException:


What is wrong in the revenge.xml?

Thanks in advance and Best Regards

Rafael Mauricio Nami[/quote]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 20, 2006 5:33 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use beta4 ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 20, 2006 7:58 am 
Newbie

Joined: Mon Jun 20, 2005 11:07 am
Posts: 16
Max
I've dug deeper in the forum, and managed to find a post with my problem, in my hibernate tools version, the reveng strategy was not put by default as the Delegated one, so no constructor could be found by an empty reveng strategy. Sorry for the silly question. But I've seen that when I try to generate a bidiretional many-to-one/one-to-many relationship, I can't specify if I want the POJO relationship just for queries(not persistent) and a persistent column of the binding id persistent. How can I achieve such thing???

Thanks in advance

Rafael Mauricio Nami


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 20, 2006 8:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
not yet possible...i'm working on that part right now ;)

_________________
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.  [ 4 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.