Re: [hibernate-dev] Re: hbm2doc diagrams
I've applied your current patches now. thanks. /max On 23/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: > I've started some minor patches today, but was wondering if anyone > would be offended if I reformatted the hbm2doc templates? The > inconsistent indentation makes patching them rather hard going. feel free. I plan to apply your current patches tomorrow. Cool. I've reformatted locally with the patches included, so I'll wait until you apply the others before submitting any more to avoid conflict-hell. Mark ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev -- -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss a division of Red Hat [EMAIL PROTECTED] ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Re: hbm2doc diagrams
On 24/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: I've applied your current patches now. thanks. Thanks Max. If you could be so kind to apply the new reformatted templates (HBX-789) then I can base my next batch of patches from that. Mark ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Re: hbm2doc diagrams
done. I tried to verify our generated html with jtidy, but it reports too many "false alarms" (e.g. usage of % in td/th width). Anyone knows of a better verifier that can be used programmatically in unittests ? On 24/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: I've applied your current patches now. thanks. Thanks Max. If you could be so kind to apply the new reformatted templates (HBX-789) then I can base my next batch of patches from that. Mark -- -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss a division of Red Hat [EMAIL PROTECTED] ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Re: hbm2doc diagrams
Any HTML/CSS that looks good on IE, FireFox and Opera (and are simple to generate) is my minimum requirements ;) Cool, well if I get the time after adding the features I need then I'll have a stab. Cool. -- -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss a division of Red Hat [EMAIL PROTECTED] ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Re: hbm2doc diagrams
On 24/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: tried to look at them but they were a big mesh of perl code or worse so not really "managable" :) Nasty, best leave that alone then. well, they have an outdated specific test for not using % in th and td with attribute. It is understood by all browsers today. It's probably because the width attribute on td/th is deprecated in HTML4, although browsers are necessarily lenient to a fault.. Any HTML/CSS that looks good on IE, FireFox and Opera (and are simple to generate) is my minimum requirements ;) Cool, well if I get the time after adding the features I need then I'll have a stab. Mark ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Re: hbm2doc diagrams
On 24/10/06, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: done. Thanks. I tried to verify our generated html with jtidy, but it reports too many "false alarms" (e.g. usage of % in td/th width). Anyone knows of a better verifier that can be used programmatically in unittests ? The w3c validators are normally the best bet, but they tend to be online tools rather than programmatic ones. They are open-source though, so it may be possible to integrate into unit tests. Regarding the jtidy warnings, they are normally fair points and can be fixed by moving to clean XHTML and CSS. I was contemplating the work involved when reformatting the templates, and it wouldn't be too hard. It'd be nice to move away from HTML4 and fully utilise CSS, but I wasn't sure what your minimum requirements are. Mark ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Re: hbm2doc diagrams
I tried to verify our generated html with jtidy, but it reports too many "false alarms" (e.g. usage of % in td/th width). Anyone knows of a better verifier that can be used programmatically in unittests ? The w3c validators are normally the best bet, but they tend to be online tools rather than programmatic ones. They are open-source though, so it may be possible to integrate into unit tests. tried to look at them but they were a big mesh of perl code or worse so not really "managable" :) Regarding the jtidy warnings, they are normally fair points... well, they have an outdated specific test for not using % in th and td with attribute. It is understood by all browsers today. ... and can be fixed by moving to clean XHTML and CSS. I was contemplating the work involved when reformatting the templates, and it wouldn't be too hard. It'd be nice to move away from HTML4 and fully utilise CSS, but I wasn't sure what your minimum requirements are. Any HTML/CSS that looks good on IE, FireFox and Opera (and are simple to generate) is my minimum requirements ;) -- -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss a division of Red Hat [EMAIL PROTECTED] ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] hbm2doc with inner-classes
Hi there, I'm looking at fixing hbm2doc to work with inner-classes and figure the following changes to POJOClass are necessary as it stands: - getShortName, getDeclarationName and getJavaTypeName need to return X.Y for inner classes, not just Y I'm not entirely sure of the distinction between getShortName and getDeclarationName - the latter seems to account for meta attributes whereas the former doesn't. Also, changing getJavaTypeName requires altering the behaviour of ImportContextImpl such that: ImportContextImpl.importType("a.b.X.Y") == "X.Y" (import a.b.X) Obviously these changes will have repercussions in other areas of hbm2x. Any thoughts on how to minimise damage? Mark ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] hbm2doc with inner-classes
I'm looking at fixing hbm2doc to work with inner-classes and figure the following changes to POJOClass are necessary as it stands: - getShortName, getDeclarationName and getJavaTypeName need to return X.Y for inner classes, not just Y ok; not sure if the classes know if they are inner classes. I'm not entirely sure of the distinction between getShortName and getDeclarationName - the latter seems to account for meta attributes whereas the former doesn't. Also, changing getJavaTypeName requires altering the behaviour of ImportContextImpl such that: ImportContextImpl.importType("a.b.X.Y") == "X.Y" (import a.b.X) Again, how do you know wether a name is a class or an inner class? -- -- Max Rydahl Andersen callto://max.rydahl.andersen Hibernate [EMAIL PROTECTED] http://hibernate.org JBoss a division of Red Hat [EMAIL PROTECTED] ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] hibernate-sqlserver-jtds-testsuite Build Timed Out
View results here -> http://cruisecontrol.jboss.com/cc/buildresults/hibernate-sqlserver-jtds-testsuite?log=log20061024215956 BUILD TIMED OUTAnt Error Message: build timeoutDate of build: 10/24/2006 21:59:56Time to build: Last changed: 12/31/2005 20:44:14Last log entry: less noisy Unit Tests: (0) Total Errors and Failures: (0) Modifications since last build: (first 50 of 2042)10649modifiedepbernard//trunk/Hibernate3/src/org/hibernate/impl/SessionImpl.javaHHH-217410647modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/legacy/Baz.hbm.xmlMake Ingres 2006 happy by not having $ in the start of a table nor column name.(merged from 3.2 branch)10647modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/hql/FooBarCopy.hbm.xmlMake Ingres 2006 happy by not having $ in the start of a table nor column name.(merged from 3.2 branch)10647modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/legacy/FooBar.hbm.xmlMake Ingres 2006 happy by not having $ in the start of a table nor column name.(merged from 3.2 branch)10616modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/hql/ast/tree/FromElementType.javadecrease log level10615modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/action/EntityUpdateAction.javaHHH-1774 : proper binding of multi-column parameter types to queries10615modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/loader/Loader.javaHHH-1774 : proper binding of multi-column parameter types to queries10615added[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/param/CollectionFilterKeyParameterSpecification.javaHHH-1774 : proper binding of multi-column parameter types to queries10615added[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/param/DynamicFilterParameterSpecification.javaHHH-1774 : proper binding of multi-column parameter types to queries10615modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.javaHHH-1774 : proper binding of multi-column parameter types to queries10615modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/hql/ast/ParameterTranslationsImpl.javaHHH-1774 : proper binding of multi-column parameter types to queries10615modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/hql/ast/HqlSqlWalker.javaHHH-1774 : proper binding of multi-column parameter types to queries10615modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/loader/hql/QueryLoader.javaHHH-1774 : proper binding of multi-column parameter types to queries10613modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/subclassfilter/JoinedSubclassFilterTest.javafixed test issue on HSQLDB10613modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/subclassfilter/DiscrimSubclassFilterTest.javafixed test issue on HSQLDB10609modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/hql/ClassificationType.javafixed test bug10606modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.javafixed erroneous assertions for Sybase/SQLServer10604modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/TestCase.javadisable test data cleanup validation by default10603modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/jpa/ql/JPAQLComplianceTest.javaremoved (now) erroneous test10599modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/optlock/OptimisticLockTest.javatest in case of versioning + batching10596modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/legacy/MultiTableTest.javafixed minor issue in use of save10596modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/legacy/MasterDetailTest.javafixed minor issue in use of save10593modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/impl/SessionImpl.javaHHH-1663 : mappings during flush10592modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/any/Properties.hbm.xmlHHH-1663 : -> mappings during flush10592modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/AllTests.javaHHH-1663 : -> mappings during flush10592added[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/any/Address.javaHHH-1663 : -> mappings during flush10592added[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/any/Person.javaHHH-1663 : -> mappings during flush10592added[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/any/AnyTypeTest.javaHHH-1663 : -> mappings during flush10592added[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/any/ComplexPropertyValue.javaHHH-1663 : -> mappings during flush10592added[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/any/Person.hbm.xmlHHH-1663 : -> mappings during flush10591modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/Query.javamissing commit of Query for HHH-2037 + updated docs for setParam
[hibernate-dev] hibernate-hsqldb-testsuite Build Completed With Testsuite Errors
View results here -> http://cruisecontrol.jboss.com/cc/buildresults/hibernate-hsqldb-testsuite?log=log20061025011340 TESTS FAILEDAnt Error Message: /home/cruisecontrol/work/scripts/build-hibernate-db-matrix.xml:92: The following error occurred while executing this line: /home/cruisecontrol/work/scripts/build-hibernate-db-matrix.xml:83: The following error occurred while executing this line: /home/cruisecontrol/work/scripts/build-common-targets.xml:11: Build Successful - Tests completed with errors or failures.Date of build: 10/25/2006 01:13:40Time to build: 8 minutes 53 secondsLast changed: 12/31/2005 20:44:14Last log entry: less noisy Unit Tests: (913) Total Errors and Failures: (6)testJoinedSubclassorg.hibernate.test.joinedsubclass.JoinedSubclassTesttestCompositeIDsorg.hibernate.test.legacy.FumTesttestReturnPropertyComponentRenameorg.hibernate.test.legacy.SQLLoaderTesttestManyToManyPropertyReforg.hibernate.test.propertyref.PropertyRefTesttestUnionSubclassorg.hibernate.test.unionsubclass2.UnionSubclassTesttestJoinFetchPropertyReforg.hibernate.test.propertyref.PropertyRefTest Modifications since last build: (first 50 of 2042)10649modifiedepbernard//trunk/Hibernate3/src/org/hibernate/impl/SessionImpl.javaHHH-217410647modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/legacy/Baz.hbm.xmlMake Ingres 2006 happy by not having $ in the start of a table nor column name.(merged from 3.2 branch)10647modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/hql/FooBarCopy.hbm.xmlMake Ingres 2006 happy by not having $ in the start of a table nor column name.(merged from 3.2 branch)10647modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/legacy/FooBar.hbm.xmlMake Ingres 2006 happy by not having $ in the start of a table nor column name.(merged from 3.2 branch)10616modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/hql/ast/tree/FromElementType.javadecrease log level10615modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/action/EntityUpdateAction.javaHHH-1774 : proper binding of multi-column parameter types to queries10615modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/loader/Loader.javaHHH-1774 : proper binding of multi-column parameter types to queries10615added[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/param/CollectionFilterKeyParameterSpecification.javaHHH-1774 : proper binding of multi-column parameter types to queries10615added[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/param/DynamicFilterParameterSpecification.javaHHH-1774 : proper binding of multi-column parameter types to queries10615modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.javaHHH-1774 : proper binding of multi-column parameter types to queries10615modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/hql/ast/ParameterTranslationsImpl.javaHHH-1774 : proper binding of multi-column parameter types to queries10615modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/hql/ast/HqlSqlWalker.javaHHH-1774 : proper binding of multi-column parameter types to queries10615modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/loader/hql/QueryLoader.javaHHH-1774 : proper binding of multi-column parameter types to queries10613modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/subclassfilter/JoinedSubclassFilterTest.javafixed test issue on HSQLDB10613modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/subclassfilter/DiscrimSubclassFilterTest.javafixed test issue on HSQLDB10609modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/hql/ClassificationType.javafixed test bug10606modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/hql/ASTParserLoadingTest.javafixed erroneous assertions for Sybase/SQLServer10604modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/TestCase.javadisable test data cleanup validation by default10603modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/jpa/ql/JPAQLComplianceTest.javaremoved (now) erroneous test10599modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/optlock/OptimisticLockTest.javatest in case of versioning + batching10596modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/legacy/MultiTableTest.javafixed minor issue in use of save10596modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/legacy/MasterDetailTest.javafixed minor issue in use of save10593modified[EMAIL PROTECTED]//trunk/Hibernate3/src/org/hibernate/impl/SessionImpl.javaHHH-1663 : mappings during flush10592modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/any/Properties.hbm.xmlHHH-1663 : -> mappings during flush10592modified[EMAIL PROTECTED]//trunk/Hibernate3/test/org/hibernate/test/AllTests.javaHHH-1663 : -> mappings during flush1059
[hibernate-dev] OptimisticTreeCache do not works
I am using hibernate from 3.2.0 branch and jboss-cache-1.4.0.ga. I have discovered that the cache throws NPE when we are trying to remove unexciting data. The methods "destroy" and "writeLoad" do so. I just have analysed the existing code and found, that method "remove" do a check before calling "remove". In this method the key remove if "cache.get" returns not null. So I applied the same approach in methods "destroy" and "writeLoad". My test now works. But I do not sure. Are this versions of hibernate and jbossCache compatible? Can we use OptimisticeTreeCache or it is under construction? Index: src/org/hibernate/cache/OptimisticTreeCache.java === --- src/org/hibernate/cache/OptimisticTreeCache.java (revision 10638) +++ src/org/hibernate/cache/OptimisticTreeCache.java (working copy) @@ -1,6 +1,7 @@ //$Id$ package org.hibernate.cache; +import java.lang.reflect.Method; import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -70,13 +71,15 @@ public void writeLoad(Object key, Object value, Object currentVersion) { try { + if ( cache.get( new Fqn( regionFqn, key ), ITEM ) != null ) { +Option option = new Option(); +option.setFailSilently( true ); +option.setDataVersion( NonLockingDataVersion.INSTANCE ); +cache.remove( new Fqn( regionFqn, key ), "ITEM", option ); + } + Option option = new Option(); option.setFailSilently( true ); - option.setDataVersion( NonLockingDataVersion.INSTANCE ); - cache.remove( new Fqn( regionFqn, key ), "ITEM", option ); - - option = new Option(); - option.setFailSilently( true ); DataVersion dv = ( source != null && source.isVersioned() ) ? new DataVersionAdapter( currentVersion, currentVersion, source.getVersionComparator(), source.toString() ) : NonLockingDataVersion.INSTANCE; @@ -172,11 +175,15 @@ public void destroy() throws CacheException { try { - Option option = new Option(); - option.setCacheModeLocal( true ); - option.setFailSilently( true ); - option.setDataVersion( NonLockingDataVersion.INSTANCE ); - cache.remove( regionFqn, option ); + // if ( cache.get(regionFqn) != null ) { + Method getMethod = org.jboss.cache.TreeCache.class.getMethod("get", new Class[] { Fqn.class }); + if (getMethod.invoke(cache, new Object[] { regionFqn }) != null) { +Option option = new Option(); +option.setCacheModeLocal( true ); +option.setFailSilently( true ); +option.setDataVersion( NonLockingDataVersion.INSTANCE ); +cache.remove( regionFqn, option ); + } } catch( Exception e ) { throw new CacheException( e ); ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev