-->
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.  [ 24 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Unidirectional Associations
PostPosted: Mon Apr 03, 2006 11:07 pm 
Newbie

Joined: Thu Aug 05, 2004 6:01 pm
Posts: 18
Location: New Zealand
Hi

I am reverse engineering our mapping files from our database.

I wondered if there was any way to override the default reverse generation of foreign key relationships from being bidirectional associations to unidirectional?

I wish to keep the many-to-one end of an association and not generate the mapping for the set on the other end.

BTW, to provide meaningful names to the many-to-one end I am overriding foreignKeyToEntityName to provide the entity name for the particular keyname. Does this sound like the best approach? I could not determine a way to simply rename it using a custom reveng.xml file.

Regards
Shane


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 2:36 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
all possible in svn ...hope to release it soon (biggest task left is to update the docs - anyone up for giving a hand ? :)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 2:49 am 
Newbie

Joined: Thu Aug 05, 2004 6:01 pm
Posts: 18
Location: New Zealand
I could be interested. What does it entail?

I checked out the latest src from svn. It seems to build inside my IDE but the build.bat did not seem to like running from a command line.


Cheers
Shane


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 3:55 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
One task I need to do is go through the doc and ensure that the doc is uptodate with what is listed in the reveng DTD.

And it would especially be great if someone else than me did it - I will be more than happy to answer questions/point to junittest to what specific element does..

The doc is in the tools/doc/reference directory.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 4:25 am 
Newbie

Joined: Thu Aug 05, 2004 6:01 pm
Posts: 18
Location: New Zealand
I'll have a look at it tomorrow.

Cheers
Shane


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 6:48 pm 
Newbie

Joined: Thu Aug 05, 2004 6:01 pm
Posts: 18
Location: New Zealand
Hi Max

If I should take this offline let me know.

I had a look at the DTD this morning with a view to update the docs. Of course I need to understand it first ;-)

I found the overridetest.reveng.xml and the OverrideBinderTest and I would now like to get things working so I can see the behaviour of some of the new options.

Here is what I did yest to get my environment started:

1. checked out the HibernateExt project from http://anonhibernate.labs.jboss.com/trunk/HibernateExt

2. checked out the Hibernate3 project (as there seemed to be dependencies to it from the HibernateExt build) from http://anonhibernate.labs.jboss.com/trunk/Hibernate3.

3. checked out the latest version (3.2) of Hibernate.

I use IntelliJ IDEA and so I ran the dist target in the HibernateExt project using ant within IntelliJ. So the dist target runs and build the jars etc.

Now I wish to execute the tests but keep running into problems just running the ant targets.

For example:
Code:
  <property name="src.dir" location="src/java"/>
  <property name="test.dir" location="src/test"/>

are not found and look like they should be prefixed with "tools"

Another is "Reference junit.moduleclasspath not found"

What are the steps for getting the tests running? I think utimately I am trying to resolve:

Code:
/**
* @author max
* NOTE: this file cannot compile without the tests being run since its dependent on its output.
*/
public interface HelloWorld extends generated.BaseHelloWorld {

}


Is there a bit more of a setup guide around?

Sorry to be a pain.

Cheers
Shane


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 7:04 pm 
Newbie

Joined: Thu Aug 05, 2004 6:01 pm
Posts: 18
Location: New Zealand
Doh!

It's always the case ... spend time writing up your problem when you think you've hit a wall ... post it ... go back to the problem ... and solve it ;-)

I had the testoutputdependent marked as src in my IDE. Have found that there a quite a few readme files around now ... so will have to read them.

So now I have tests executing ... but need to resolve

Code:
java.sql.SQLException: Table not found: EXCOLUMNS in statement [drop table excolumns] for drop table excolumns


in the OverrideBinderTest .testColumnTypeMappings (and others).

Cheers
Shane


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 7:59 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Hi Smingins,

Sounds like you solved most of your previous problems, let me know if something is still relevant to answer.

Regarding the the "table not found" stuff then this should just be a printed as a warning correct ? It is simply just schemaexport (or my unittests) that tells you that it could not drop a table (because it is not there yet) so no biggie.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 8:22 pm 
Newbie

Joined: Thu Aug 05, 2004 6:01 pm
Posts: 18
Location: New Zealand
Hi Max

How are you executing your tests? How should I execute a single TestCase?

Being used to IntelliJ (and the wonderful support for JUnit) I would like to be able to run them within the IDE but I think that could be quite a mission.

For example when I run the OverrideBinderTest.testColumnPropertyNameMappings I get an exception due the property not being found Output below.

When I run the OverrideBinderTest 5/17 fail.

Any pointers?

Cheers
Shane

Code:
12:11:06,343  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:11:06,343  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:.
12:11:06,343  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:11:06,343  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:11:06,343  INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
12:11:06,343  INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
12:11:06,343  INFO SettingsFactory:78 - RDBMS: HSQL Database Engine, version: 1.8.0
12:11:06,343  INFO SettingsFactory:79 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
12:11:06,353  INFO Dialect:106 - Using dialect: org.hibernate.dialect.HSQLDialect
12:11:06,353  INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:11:06,353  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:11:06,363  INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
12:11:06,363  INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
12:11:06,363  INFO SettingsFactory:137 - JDBC batch size: 15
12:11:06,363  INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled
12:11:06,363  INFO SettingsFactory:145 - Scrollable result sets: enabled
12:11:06,363  INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
12:11:06,363  INFO SettingsFactory:161 - Connection release mode: auto
12:11:06,363  INFO SettingsFactory:185 - Maximum outer join fetch depth: 1
12:11:06,363  INFO SettingsFactory:188 - Default batch fetch size: 8
12:11:06,363  INFO SettingsFactory:192 - Generate SQL with comments: disabled
12:11:06,363  INFO SettingsFactory:196 - Order SQL updates by primary key: enabled
12:11:06,373  INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:11:06,373  INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
12:11:06,373  INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:11:06,373  INFO SettingsFactory:210 - Second-level cache: enabled
12:11:06,373  INFO SettingsFactory:214 - Query cache: disabled
12:11:06,373  INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider
12:11:06,373  INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
12:11:06,373  INFO SettingsFactory:234 - Cache region prefix: hibernate.test
12:11:06,373  INFO SettingsFactory:238 - Structured second-level cache entries: disabled
12:11:06,373  INFO SettingsFactory:265 - Statistics: disabled
12:11:06,373  INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled
12:11:06,373  INFO SettingsFactory:284 - Default entity-mode: pojo
Execute: drop table excolumns
Execute: drop table parent
Execute: drop table children
Execute: drop table customer
Execute: drop table orders
java.sql.SQLException: Table not found: EXCOLUMNS in statement [drop table excolumns] for drop table excolumns
java.sql.SQLException: Table not found: PARENT in statement [drop table parent] for drop table parent
java.sql.SQLException: Table not found: CHILDREN in statement [drop table children] for drop table children
java.sql.SQLException: Table not found: CUSTOMER in statement [drop table customer] for drop table customer
java.sql.SQLException: Table not found: ORDERS in statement [drop table orders] for drop table orders
java.sql.SQLException: Table not found: INTHEMIDDLE in statement [drop table inthemiddle] for drop table inthemiddle
java.sql.SQLException: Table not found: MISC_TYPES in statement [drop table misc_types] for drop table misc_types
Execute: drop table inthemiddle
Execute: drop table misc_types
Execute: drop table defunct_table
java.sql.SQLException: Table not found: DEFUNCT_TABLE in statement [drop table defunct_table] for drop table defunct_table
java.sql.SQLException: Table not found: DUMMY in statement [drop table dummy] for drop table dummy
Execute: drop table dummy
12:11:06,383  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:11:06,383  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:11:06,383  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:11:06,383  INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
12:11:06,383  INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
12:11:06,393  INFO SettingsFactory:78 - RDBMS: HSQL Database Engine, version: 1.8.0
12:11:06,393  INFO SettingsFactory:79 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
12:11:06,393  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:.
12:11:06,393  INFO Dialect:106 - Using dialect: org.hibernate.dialect.HSQLDialect
12:11:06,393  INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:11:06,393  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:11:06,393  INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
12:11:06,393  INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
12:11:06,393  INFO SettingsFactory:137 - JDBC batch size: 15
12:11:06,393  INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled
12:11:06,393  INFO SettingsFactory:145 - Scrollable result sets: enabled
12:11:06,393  INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
12:11:06,403  INFO SettingsFactory:161 - Connection release mode: auto
12:11:06,403  INFO SettingsFactory:185 - Maximum outer join fetch depth: 1
12:11:06,403  INFO SettingsFactory:188 - Default batch fetch size: 8
12:11:06,403  INFO SettingsFactory:192 - Generate SQL with comments: disabled
12:11:06,403  INFO SettingsFactory:196 - Order SQL updates by primary key: enabled
12:11:06,403  INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:11:06,403  INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
12:11:06,403  INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:11:06,403  INFO SettingsFactory:210 - Second-level cache: enabled
12:11:06,403  INFO SettingsFactory:214 - Query cache: disabled
12:11:06,403  INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider
12:11:06,403  INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
12:11:06,403  INFO SettingsFactory:234 - Cache region prefix: hibernate.test
12:11:06,403  INFO SettingsFactory:238 - Structured second-level cache entries: disabled
12:11:06,403  INFO SettingsFactory:265 - Statistics: disabled
12:11:06,403  INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled
12:11:06,413  INFO SettingsFactory:284 - Default entity-mode: pojo
12:11:06,413  INFO OverrideRepository:113 - Mapping resource: org/hibernate/tool/test/jdbc2cfg/overridetest.reveng.xml
12:11:06,423  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:11:06,423  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:11:06,423  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:11:06,423  INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
12:11:06,423  INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
12:11:06,433  INFO SettingsFactory:78 - RDBMS: HSQL Database Engine, version: 1.8.0
12:11:06,433  INFO SettingsFactory:79 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
12:11:06,433  INFO Dialect:106 - Using dialect: org.hibernate.dialect.HSQLDialect
12:11:06,433  INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:11:06,433  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:11:06,433  INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
12:11:06,433  INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
12:11:06,433  INFO SettingsFactory:137 - JDBC batch size: 15
12:11:06,433  INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled
12:11:06,433  INFO SettingsFactory:145 - Scrollable result sets: enabled
12:11:06,433  INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
12:11:06,433  INFO SettingsFactory:161 - Connection release mode: auto
12:11:06,443  INFO SettingsFactory:185 - Maximum outer join fetch depth: 1
12:11:06,443  INFO SettingsFactory:188 - Default batch fetch size: 8
12:11:06,443  INFO SettingsFactory:192 - Generate SQL with comments: disabled
12:11:06,443  INFO SettingsFactory:196 - Order SQL updates by primary key: enabled
12:11:06,443  INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:11:06,443  INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
12:11:06,443  INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:11:06,443  INFO SettingsFactory:210 - Second-level cache: enabled
12:11:06,443  INFO SettingsFactory:214 - Query cache: disabled
12:11:06,443  INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider
12:11:06,443  INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
12:11:06,443  INFO SettingsFactory:234 - Cache region prefix: hibernate.test
12:11:06,443  INFO SettingsFactory:238 - Structured second-level cache entries: disabled
12:11:06,453  INFO SettingsFactory:265 - Statistics: disabled
12:11:06,453  INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled
12:11:06,453  INFO SettingsFactory:284 - Default entity-mode: pojo
Execute: create table dummy (id numeric(10,0) not null, primary key (id) )
Execute: create table defunct_table ( id numeric(10,0) not null, name varchar(20), shortname varchar(5), flag varchar(1), dumid numeric(10,0), primary key (id), foreign key (dumid) references dummy)
Execute: create table misc_types ( id numeric(10,0) not null, name varchar(20), shortname varchar(5), flag varchar(1), primary key (id) )
Execute: create table inthemiddle ( miscid numeric(10,0), defunctid numeric(10,0), foreign key (miscid) references misc_types, foreign key (defunctid) references defunct_table )
Execute: create table customer ( custid varchar(10), name varchar(20) )
Execute: create table orders ( orderid varchar(10), name varchar(20),  custid varchar(10), completed numeric(1) not null, verified numeric(1) )
Execute: create table parent ( id varchar(10), name varchar(20))
Execute: create table children ( id varchar(10), parentid varchar(10), name varchar(20) )
Execute: create table excolumns (id varchar(12), name varchar(20), excolumn numeric(10,0) )
12:11:06,453  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:11:06,453  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:11:06,453  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:11:06,463  INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
12:11:06,463  INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
12:11:06,463  INFO SettingsFactory:78 - RDBMS: HSQL Database Engine, version: 1.8.0
12:11:06,463  INFO SettingsFactory:79 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
12:11:06,463  INFO Dialect:106 - Using dialect: org.hibernate.dialect.HSQLDialect
12:11:06,463  INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:11:06,463  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:11:06,463  INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
12:11:06,463  INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
12:11:06,463  INFO SettingsFactory:137 - JDBC batch size: 15
12:11:06,473  INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled
12:11:06,473  INFO SettingsFactory:145 - Scrollable result sets: enabled
12:11:06,473  INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
12:11:06,473  INFO SettingsFactory:161 - Connection release mode: auto
12:11:06,473  INFO SettingsFactory:185 - Maximum outer join fetch depth: 1
12:11:06,473  INFO SettingsFactory:188 - Default batch fetch size: 8
12:11:06,473  INFO SettingsFactory:192 - Generate SQL with comments: disabled
12:11:06,473  INFO SettingsFactory:196 - Order SQL updates by primary key: enabled
12:11:06,473  INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:11:06,473  INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
12:11:06,483  INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:11:06,483  INFO SettingsFactory:210 - Second-level cache: enabled
12:11:06,483  INFO SettingsFactory:214 - Query cache: disabled
12:11:06,483  INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider
12:11:06,483  INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
12:11:06,483  INFO SettingsFactory:234 - Cache region prefix: hibernate.test
12:11:06,483  INFO SettingsFactory:238 - Structured second-level cache entries: disabled
12:11:06,483  INFO SettingsFactory:265 - Statistics: disabled
12:11:06,483  INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled
12:11:06,483  INFO SettingsFactory:284 - Default entity-mode: pojo
12:11:06,513  WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in CHILDREN. Asking rev.eng. strategy
12:11:06,513  WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for CHILDREN
12:11:06,513  WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in CUSTOMER. Asking rev.eng. strategy
12:11:06,513  WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for CUSTOMER
12:11:06,523  WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in EXCOLUMNS. Asking rev.eng. strategy
12:11:06,523  WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for EXCOLUMNS
12:11:06,523  WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in INTHEMIDDLE. Asking rev.eng. strategy
12:11:06,523  WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for INTHEMIDDLE
12:11:06,533  WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in ORDERS. Asking rev.eng. strategy
12:11:06,533  WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for ORDERS
12:11:06,533  WARN JDBCReader:356 - The JDBC driver didn't report any primary key columns in PARENT. Asking rev.eng. strategy
12:11:06,533  WARN JDBCReader:368 - Rev.eng. strategy did not report any primary key columns for PARENT
12:11:06,543  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:.
12:11:06,543  INFO OverrideRepository:113 - Mapping resource: org/hibernate/tool/test/jdbc2cfg/overridetest.reveng.xml
12:11:06,583  INFO DriverManagerConnectionProvider:41 - Using Hibernate built-in connection pool (not for production use!)
12:11:06,583  INFO DriverManagerConnectionProvider:42 - Hibernate connection pool size: 1
12:11:06,583  INFO DriverManagerConnectionProvider:45 - autocommit mode: false
12:11:06,583  INFO DriverManagerConnectionProvider:80 - using driver: org.hsqldb.jdbcDriver at URL: jdbc:hsqldb:.
12:11:06,583  INFO DriverManagerConnectionProvider:86 - connection properties: {user=sa, password=****}
12:11:06,583  INFO SettingsFactory:78 - RDBMS: HSQL Database Engine, version: 1.8.0
12:11:06,583  INFO SettingsFactory:79 - JDBC driver: HSQL Database Engine Driver, version: 1.8.0
12:11:06,593  INFO Dialect:106 - Using dialect: org.hibernate.dialect.HSQLDialect
12:11:06,593  INFO TransactionFactoryFactory:31 - Using default transaction strategy (direct JDBC transactions)
12:11:06,593  INFO TransactionManagerLookupFactory:33 - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
12:11:06,603  INFO SettingsFactory:126 - Automatic flush during beforeCompletion(): disabled
12:11:06,603  INFO SettingsFactory:130 - Automatic session close at end of transaction: disabled
12:11:06,603  INFO SettingsFactory:137 - JDBC batch size: 15
12:11:06,603  INFO SettingsFactory:140 - JDBC batch updates for versioned data: enabled
12:11:06,603  INFO SettingsFactory:145 - Scrollable result sets: enabled
12:11:06,603  INFO SettingsFactory:153 - JDBC3 getGeneratedKeys(): disabled
12:11:06,603  INFO SettingsFactory:161 - Connection release mode: auto
12:11:06,603  INFO SettingsFactory:185 - Maximum outer join fetch depth: 1
12:11:06,603  INFO SettingsFactory:188 - Default batch fetch size: 8
12:11:06,603  INFO SettingsFactory:192 - Generate SQL with comments: disabled
12:11:06,603  INFO SettingsFactory:196 - Order SQL updates by primary key: enabled
12:11:06,623  INFO SettingsFactory:357 - Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
12:11:06,623  INFO ASTQueryTranslatorFactory:24 - Using ASTQueryTranslatorFactory
12:11:06,623  INFO SettingsFactory:204 - Query language substitutions: {no='N', true=1, yes='Y', false=0}
12:11:06,623  INFO SettingsFactory:210 - Second-level cache: enabled
12:11:06,623  INFO SettingsFactory:214 - Query cache: disabled
12:11:06,623  INFO SettingsFactory:344 - Cache provider: org.hibernate.cache.HashtableCacheProvider
12:11:06,623  INFO SettingsFactory:229 - Optimize cache for minimal puts: disabled
12:11:06,623  INFO SettingsFactory:234 - Cache region prefix: hibernate.test
12:11:06,623  INFO SettingsFactory:238 - Structured second-level cache entries: disabled
12:11:06,623  INFO SettingsFactory:265 - Statistics: disabled
12:11:06,623  INFO SettingsFactory:269 - Deleted entity synthetic identifier rollback: disabled
12:11:06,623  INFO SettingsFactory:284 - Default entity-mode: pojo
Execute: drop table excolumns
Execute: drop table parent
Execute: drop table children
Execute: drop table customer
Execute: drop table orders
Execute: drop table inthemiddle
Execute: drop table misc_types
Execute: drop table defunct_table
Execute: drop table dummy
12:11:06,633  INFO DriverManagerConnectionProvider:147 - cleaning up connection pool: jdbc:hsqldb:.

org.hibernate.MappingException: property not found: completed on entity Orders
   at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:377)
   at org.hibernate.mapping.PersistentClass.getProperty(PersistentClass.java:382)
   at org.hibernate.tool.test.jdbc2cfg.OverrideBinderTest.testColumnTypeMappings(OverrideBinderTest.java:145)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)



Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 8:40 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
smingins wrote:
Hi Max

How are you executing your tests? How should I execute a single TestCase?



I just run it ;)

Quote:
Being used to IntelliJ (and the wonderful support for JUnit) I would like to be able to run them within the IDE but I think that could be quite a mission.


I do this all the time in Eclipse ...so should be doable in intellij too ;)

Let me see if I got everything committed...yes, everything is committed (I did commit some minor stuff, but not related to these failures)

What database are you using ? The current testsuite in some cases relies on HSQLDB syntax/behavior to work. (but should work on most sane db's ;)

Quote:
For example when I run the OverrideBinderTest.testColumnPropertyNameMappings I get an exception due the property not being found Output below.


The only reason why this should fail is either:

a) the table were actually not even created

b) there is some bug in driver metadata handling in your db or in the tools JDBCReader.

What I would do to figure this out is to put a breakpoint at the faulty line and then inspect what properties the "classMapping" instance actually have ...and if that does not shed some light then try and run this stuff with full debug and check why the "completed" column is not read from the Orders table.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 9:17 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
As busy as I am at the moment I would be happy to give you a hand with this if you wish.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 9:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
with enhancing the docs or fixing smingins test issues ?

In any case, You shall be welcomed ;)

In context of enhancing the docs then if
smingins is working on bringing the doc in sync with the reveng.xml dtd then beefing up/examplification of the ant invocation/usage is another area to attack....

feel free to coordinate so you don't step on each others toes - and in any case, feel free to submit whatever you can to the jira and i will take good care of it ;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 9:35 pm 
Newbie

Joined: Thu Aug 05, 2004 6:01 pm
Posts: 18
Location: New Zealand
I am using the HSQLDB dbase. The class mapping properties for Order are coming back empty!

My gut feeling is that this something to do with how I have the project setup in my IDE.

If you use Eclipse would it be possible to send me the .classpath and .project files for the workspace you are using where you run the tests? shanem@clear.net.nz


Cheers
Shane


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 9:40 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
I think the relevant part is the hibernate.properties:

hibernate.default_schema PUBLIC
#hibernate.default_catalog PUBLIC

these two are important to get proper testing of multi schema handling.

/max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 04, 2006 9:43 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
I'll have a play and do some doco for you. I'll pass it though to you when I am done (or atleast a reasonable draft is completed).


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

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.