programmatic configuration of Hibernate Search
by Sanne Grinovero
Hello,
I was wondering if the new programmatic configuration of Hibernate
Search you're working on is going to be a complete alternative
(either-or) to the configure-by-annotations way or if they could be
complimentary.
Will it be possible to make some changes to the configuration created
by annotation scanning in a programmatic way?
Got to this train of thought after readin this forum post:
http://forum.hibernate.org/viewtopic.php?t=996359
Sanne
15 years, 7 months
want to join hibernate development community
by bha_joy@yahoo.co.in
Hi All,
I am new to hibernate development community though
I have been using the the product for some time now , I would like to
be a part of this wonderful product how can I get on with it .
Any help in this regard will be highly appreciated.
Thanks and Regards Joydeep Bhattacharjee
Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
15 years, 7 months
Can Stored procedure be called from EJB3 annotations
by joy deep
Hi All,
I am working in a project where my persistence framework is Hibernate 3.2 , we are using the JPA standard wich Hibernate implements, but I was not able to find a way how to call stored procedures using JPA annotations.Any help in this regard will be appreciated.
Thanks and Regards Joydeep Bhattacharjee
Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
15 years, 7 months
[HSearch] @ClassBridge
by Emmanuel Bernard
somebody remembers why @Class Bridge.impl is defaulted.
This looks wrong to me and I can't find an explanation.
15 years, 7 months
hibernate-tessuite testing errors:
by Elhanan Maayan
downloaded hibernate source from trunk , am i doing something wrong?
Failed tests:
testDuplicateImplicitJoinInSelect(*org.hibernate.test.hql.HQLTest*)
Tests run: 169, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 3.297 sec
<<< FAILURE!
testDuplicateImplicitJoinInSelect(org.hibernate.test.hql.HQLTest) Time
elapsed: 0.016 sec <<< FAILURE!
junit.framework.ComparisonFailure: SQL is not the same as the old SQL
(scalar=true) expected:<...1_.body_weight as col_0_0_ from Animal animal0_
inner join Animal animal1_ on animal0_.mother_id=animal1_.id where
(animal1_.body_weight>10 )> but was:<...2_.body_weight as col_0_0_ from
Animal animal0_ inner join Animal animal1_ on
animal0_.mother_id=animal1_.id, Animal animal2_ where
animal0_.mother_id=animal2_.id and animal2_.body_weight>10>
at junit.framework.Assert.assertEquals(Assert.java:81)
at
org.hibernate.test.hql.QueryTranslatorTestCase.assertSQLEquals(QueryTranslatorTestCase.java:315)
at
org.hibernate.test.hql.QueryTranslatorTestCase.checkSql(QueryTranslatorTestCase.java:304)
at
org.hibernate.test.hql.QueryTranslatorTestCase.assertTranslation(QueryTranslatorTestCase.java:194)
at
org.hibernate.test.hql.QueryTranslatorTestCase.assertTranslation(QueryTranslatorTestCase.java:120)
at
org.hibernate.test.hql.QueryTranslatorTestCase.assertTranslation(QueryTranslatorTestCase.java:102)
at
org.hibernate.test.hql.HQLTest.testDuplicateImplicitJoinInSelect(HQLTest.java:1133)
Tests in error:
testLoadingAndSerializationOfConfiguration(*
org.hibernate.test.cfg.ConfigurationPerformanceTest*)
-------------------------------------------------------------------------------
Test set: org.hibernate.test.cfg.ConfigurationPerformanceTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.157 sec
<<< FAILURE!
testLoadingAndSerializationOfConfiguration(org.hibernate.test.cfg.ConfigurationPerformanceTest)
Time elapsed: 0.844 sec <<< ERROR!
java.io.NotSerializableException:
org.hibernate.id.factory.DefaultIdentifierGeneratorFactory
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at
org.hibernate.test.cfg.ConfigurationPerformanceTest.saveAndLoad(ConfigurationPerformanceTest.java:208)
at
org.hibernate.test.cfg.ConfigurationPerformanceTest.testLoadingAndSerializationOfConfiguration(ConfigurationPerformanceTest.java:127)
testSessionFactoryCreationTime(org.hibernate.test.cfg.ConfigurationPerformanceTest)
Time elapsed: 0.297 sec <<< ERROR!
java.io.IOException: CreateProcess: javac -version -d
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test0.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test1.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test2.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test3.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test4.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test5.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test6.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test7.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test8.java
”
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at java.lang.Runtime.exec(Runtime.java:429)
at java.lang.Runtime.exec(Runtime.java:326)
at
org.hibernate.test.cfg.ConfigurationPerformanceTest.generateTestFiles(ConfigurationPerformanceTest.java:287)
at
org.hibernate.test.cfg.ConfigurationPerformanceTest.testSessionFactoryCreationTime(ConfigurationPerformanceTest.java:160)
testSessionFactoryCreationTime(*
org.hibernate.test.cfg.ConfigurationPerformanceTest*)
-------------------------------------------------------------------------------
Test set: org.hibernate.test.cfg.ConfigurationPerformanceTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 1.157 sec
<<< FAILURE!
testLoadingAndSerializationOfConfiguration(org.hibernate.test.cfg.ConfigurationPerformanceTest)
Time elapsed: 0.844 sec <<< ERROR!
java.io.NotSerializableException:
org.hibernate.id.factory.DefaultIdentifierGeneratorFactory
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
at
org.hibernate.test.cfg.ConfigurationPerformanceTest.saveAndLoad(ConfigurationPerformanceTest.java:208)
at
org.hibernate.test.cfg.ConfigurationPerformanceTest.testLoadingAndSerializationOfConfiguration(ConfigurationPerformanceTest.java:127)
testSessionFactoryCreationTime(org.hibernate.test.cfg.ConfigurationPerformanceTest)
Time elapsed: 0.297 sec <<< ERROR!
java.io.IOException: CreateProcess: javac -version -d
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test0.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test1.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test2.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test3.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test4.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test5.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test6.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test7.java
C:\eclipse342\workspace\hibernate\testsuite\target\test-classes\org\hibernate\test\cfg\work\Test8.java
”
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at java.lang.Runtime.exec(Runtime.java:429)
at java.lang.Runtime.exec(Runtime.java:326)
at
org.hibernate.test.cfg.ConfigurationPerformanceTest.generateTestFiles(ConfigurationPerformanceTest.java:287)
at
org.hibernate.test.cfg.ConfigurationPerformanceTest.testSessionFactoryCreationTime(ConfigurationPerformanceTest.java:160)
-------------------------------------------------------------------------------
Test set: org.hibernate.test.legacy.ParentChildTest
-------------------------------------------------------------------------------
Tests run: 18, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.25 sec
<<< FAILURE!
testComplexCriteria(org.hibernate.test.legacy.ParentChildTest) Time elapsed:
0.453 sec <<< ERROR!
org.hibernate.exception.SQLGrammarException: could not execute query
at
org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2235)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2129)
at org.hibernate.loader.Loader.list(Loader.java:2124)
at
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:117)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1531)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:306)
at
org.hibernate.test.legacy.ParentChildTest.testComplexCriteria(ParentChildTest.java:248)
Caused by: java.sql.SQLException: Column not found: FOO4_.STRING_ in
statement [select this_.baz_id_column_ as baz1_1219_11_, this_.count_count
as count2_1219_11_, this_.name_b as name3_1219_11_, this_.foo as
foo1219_11_, this_.superBaz as superBaz1219_11_, this_.str as str1219_11_,
foo6_."foo_idcolumnname123" as foo1_1211_0_, foo6_.version as
version1211_0_, foo6_.foo as foo1211_0_, foo6_.long_ as long5_1211_0_,
foo6_."integer__" as integer6_1211_0_, foo6_.float_ as float7_1211_0_,
foo6_.x as x1211_0_, foo6_.double_ as double9_1211_0_, foo6_.date_ as
date10_1211_0_, foo6_.timestamp_ as timestamp11_1211_0_, foo6_.boolean_ as
boolean12_1211_0_, foo6_.bool_ as bool13_1211_0_, foo6_.null_ as
null14_1211_0_, foo6_.short_ as short15_1211_0_, foo6_.char_ as
char16_1211_0_, foo6_.zero_ as zero17_1211_0_, foo6_.int_ as int18_1211_0_,
foo6_.string_ as string19_1211_0_, foo6_.byte_ as byte20_1211_0_,
foo6_.yesno as yesno1211_0_, foo6_.blobb_ as blobb22_1211_0_, foo6_.nullBlob
as nullBlob1211_0_, foo6_.bin_ as bin24_1211_0_, foo6_."localeayzabc123" as
localea25_1211_0_, foo6_.first_name as first26_1211_0_, foo6_.surname as
surname1211_0_, foo6_.count_ as count28_1211_0_, foo6_.name_ as
name29_1211_0_, foo6_.g__ as g30_1211_0_, foo6_.cmpnt_null_ as
cmpnt31_1211_0_, foo6_.subname as subname1211_0_, foo6_.fee_sub as
fee33_1211_0_, foo6_.null_cmpnt_ as null34_1211_0_, foo6_1_.joinedProp as
joinedProp1215_0_, foo6_2_.dependent as dependent1216_0_, foo6_.the_time as
the35_1211_0_, foo6_.baz as baz1211_0_, foo6_.bar_string as bar37_1211_0_,
foo6_.bar_count as bar38_1211_0_, foo6_.name as name1211_0_, foo6_.clazz as
clazz1211_0_, foo6_.gen_id as gen41_1211_0_, foo6_3_.name_name as
name2_1218_0_, foo6_.int_/2 as formula34_0_, foo6_."foo_subclass_1234" as
foo2_1211_0_, glarch7_.tha_key as tha1_1246_1_, glarch7_.version as
version1246_1_, glarch7_.namecvbnmasdf as namecvbn3_1246_1_, glarch7_.next_
as next4_1246_1_, glarch7_.order_ as order5_1246_1_, glarch7_.foo as
foo1246_1_, glarch7_.bar as bar1246_1_, glarch7_.x as x1246_1_,
glarch7_.immutable as immutable1246_1_, glarch7_."any_id_of_object" as
any10_1246_1_, glarch7_."any_class_of_object" as any11_1246_1_,
glarch7_.count_ as count12_1246_1_, glarch7_.glarch_ as glarch13_1246_1_,
fee8_.id_ as id1_1256_2_, fee8_.fi as fi1256_2_, fee8_.fee as fee1256_2_,
fee8_.anotherFee as anotherFee1256_2_, fee8_.qux as qux1256_2_, fee8_.count_
as count6_1256_2_, fee8_.name as name1256_2_, fee8_.null_prop as
null8_1256_2_, fee9_.id_ as id1_1256_3_, fee9_.fi as fi1256_3_, fee9_.fee as
fee1256_3_, fee9_.anotherFee as anotherFee1256_3_, fee9_.qux as qux1256_3_,
fee9_.count_ as count6_1256_3_, fee9_.name as name1256_3_, fee9_.null_prop
as null8_1256_3_, fee10_.id_ as id1_1256_4_, fee10_.fi as fi1256_4_,
fee10_.fee as fee1256_4_, fee10_.anotherFee as anotherFee1256_4_, fee10_.qux
as qux1256_4_, fee10_.count_ as count6_1256_4_, fee10_.name as name1256_4_,
fee10_.null_prop as null8_1256_4_, baz11_.baz_id_column_ as baz1_1219_5_,
baz11_.count_count as count2_1219_5_, baz11_.name_b as name3_1219_5_,
baz11_.foo as foo1219_5_, baz11_.superBaz as superBaz1219_5_, baz11_.str as
str1219_5_, topglarche12_.idtopglarch as idtopgl16_13_,
topglarche12_.tha_key as tha1_13_, topglarche12_.mapkey as mapkey13_,
topglarche12_.tha_key as tha1_1246_6_, topglarche12_.version as
version1246_6_, topglarche12_.namecvbnmasdf as namecvbn3_1246_6_,
topglarche12_.next_ as next4_1246_6_, topglarche12_.order_ as
order5_1246_6_, topglarche12_.foo as foo1246_6_, topglarche12_.bar as
bar1246_6_, topglarche12_.x as x1246_6_, topglarche12_.immutable as
immutable1246_6_, topglarche12_."any_id_of_object" as any10_1246_6_,
topglarche12_."any_class_of_object" as any11_1246_6_, topglarche12_.count_
as count12_1246_6_, topglarche12_.glarch_ as glarch13_1246_6_,
baz13_.baz_id_column_ as baz1_1219_7_, baz13_.count_count as count2_1219_7_,
baz13_.name_b as name3_1219_7_, baz13_.foo as foo1219_7_, baz13_.superBaz as
superBaz1219_7_, baz13_.str as str1219_7_, foo3_."foo_idcolumnname123" as
foo1_1211_8_, foo3_.version as version1211_8_, foo3_.foo as foo1211_8_,
foo3_.long_ as long5_1211_8_, foo3_."integer__" as integer6_1211_8_,
foo3_.float_ as float7_1211_8_, foo3_.x as x1211_8_, foo3_.double_ as
double9_1211_8_, foo3_.date_ as date10_1211_8_, foo3_.timestamp_ as
timestamp11_1211_8_, foo3_.boolean_ as boolean12_1211_8_, foo3_.bool_ as
bool13_1211_8_, foo3_.null_ as null14_1211_8_, foo3_.short_ as
short15_1211_8_, foo3_.char_ as char16_1211_8_, foo3_.zero_ as
zero17_1211_8_, foo3_.int_ as int18_1211_8_, foo3_.string_ as
string19_1211_8_, foo3_.byte_ as byte20_1211_8_, foo3_.yesno as
yesno1211_8_, foo3_.blobb_ as blobb22_1211_8_, foo3_.nullBlob as
nullBlob1211_8_, foo3_.bin_ as bin24_1211_8_, foo3_."localeayzabc123" as
localea25_1211_8_, foo3_.first_name as first26_1211_8_, foo3_.surname as
surname1211_8_, foo3_.count_ as count28_1211_8_, foo3_.name_ as
name29_1211_8_, foo3_.g__ as g30_1211_8_, foo3_.cmpnt_null_ as
cmpnt31_1211_8_, foo3_.subname as subname1211_8_, foo3_.fee_sub as
fee33_1211_8_, foo3_.null_cmpnt_ as null34_1211_8_, foo3_1_.joinedProp as
joinedProp1215_8_, foo3_2_.dependent as dependent1216_8_, foo3_.the_time as
the35_1211_8_, foo3_.baz as baz1211_8_, foo3_.bar_string as bar37_1211_8_,
foo3_.bar_count as bar38_1211_8_, foo3_.name as name1211_8_, foo3_.clazz as
clazz1211_8_, foo3_.gen_id as gen41_1211_8_, foo3_3_.name_name as
name2_1218_8_, foo3_.int_/2 as formula34_8_, foo3_."foo_subclass_1234" as
foo2_1211_8_, glarch1_.tha_key as tha1_1246_9_, glarch1_.version as
version1246_9_, glarch1_.namecvbnmasdf as namecvbn3_1246_9_, glarch1_.next_
as next4_1246_9_, glarch1_.order_ as order5_1246_9_, glarch1_.foo as
foo1246_9_, glarch1_.bar as bar1246_9_, glarch1_.x as x1246_9_,
glarch1_.immutable as immutable1246_9_, glarch1_."any_id_of_object" as
any10_1246_9_, glarch1_."any_class_of_object" as any11_1246_9_,
glarch1_.count_ as count12_1246_9_, glarch1_.glarch_ as glarch13_1246_9_,
glarch2_.tha_key as tha1_1246_10_, glarch2_.version as version1246_10_,
glarch2_.namecvbnmasdf as namecvbn3_1246_10_, glarch2_.next_ as
next4_1246_10_, glarch2_.order_ as order5_1246_10_, glarch2_.foo as
foo1246_10_, glarch2_.bar as bar1246_10_, glarch2_.x as x1246_10_,
glarch2_.immutable as immutable1246_10_, glarch2_."any_id_of_object" as
any10_1246_10_, glarch2_."any_class_of_object" as any11_1246_10_,
glarch2_.count_ as count12_1246_10_, glarch2_.glarch_ as glarch13_1246_10_
from baz this_ left outer join "foos" foo6_ on
this_.foo=foo6_."foo_idcolumnname123" left outer join jointable foo6_1_ on
foo6_."foo_idcolumnname123"=foo6_1_.fooid left outer join foo_dep_table
foo6_2_ on foo6_."foo_idcolumnname123"=foo6_2_.fooid left outer join
bar_join_table foo6_3_ on foo6_."foo_idcolumnname123"=foo6_3_.bar_id left
outer join "glarchez" glarch7_ on foo6_.g__=glarch7_.tha_key left outer join
"the fees" fee8_ on foo6_2_.dependent=fee8_.id_ left outer join "the fees"
fee9_ on fee8_.fee=fee9_.id_ left outer join "the fees" fee10_ on
fee9_.anotherFee=fee10_.id_ left outer join baz baz11_ on
foo6_.baz=baz11_.baz_id_column_ left outer join "glarchez" topglarche12_ on
baz11_.baz_id_column_=topglarche12_.idtopglarch left outer join baz baz13_
on baz11_.superBaz=baz13_.baz_id_column_ inner join "foos" foo3_ on
this_.baz_id_column_=foo3_.baz_id and foo3_."foo_subclass_1234" in ('F',
'B', 'T') left outer join jointable foo3_1_ on
foo3_."foo_idcolumnname123"=foo3_1_.fooid left outer join foo_dep_table
foo3_2_ on foo3_."foo_idcolumnname123"=foo3_2_.fooid left outer join
bar_join_table foo3_3_ on foo3_."foo_idcolumnname123"=foo3_3_.bar_id inner
join fooArray fooarray15_ on this_.baz_id_column_=fooarray15_.id_ and (
fooarray15_.i<8) inner join "glarchez" glarch1_ on
this_.baz_id_column_=glarch1_.idtopglarch inner join "glarchez" glarch2_ on
glarch1_.tha_key=glarch2_.array_key where glarch1_.namecvbnmasdf is not null
and glarch2_.namecvbnmasdf=glarch2_.namecvbnmasdf and
glarch2_.namecvbnmasdf=? and glarch2_.x>? and foo3_.null_ is null and
foo3_.string_=? and foo3_."integer__"<? and foo4_.string_=?]
at org.hsqldb.jdbc.Util.throwError(Unknown Source)
at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
at
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534)
at
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:452)
at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1578)
at org.hibernate.loader.Loader.doQuery(Loader.java:696)
at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2232)
... 35 more
testComplexCriteria(*org.hibernate.test.legacy.ParentChildTest*)
Tests run: 1417, Failures: 1, Errors: 3, Skipped: 0
15 years, 7 months
[Bean Validation] Fwd: ignore-annotations in super classes
by Emmanuel Bernard
WDYT?
Begin forwarded message:
> From: Emmanuel Bernard <emmanuel(a)hibernate.org>
> Date: April 6, 2009 19:06:40 CEDT
> To: Hardy Ferentschik <hibernate(a)ferentschik.de>
> Subject: Re: ignore-annotations in super classes
>
> Good question.
> I would say no. To do that, you would need to override the
> superclass or interface definition.
>
> I think that makes it more consistent. Otherwise rules could become
> complex, I think.
>
> PS I could be convince of the opposite but like the simplicity of
> the answer.
>
> On Apr 6, 2009, at 18:59, Hardy Ferentschik wrote:
>
>> Hi,
>>
>> If I set ignore-annotations to true on bean, class, field or getter
>> level, do I then also ignore the annotations placed on the
>> appropriate level in the super classes (or other implemented
>> interfaces in the case of class level)? I would assume thought,
>> right?
>>
>> --Hardy
>
15 years, 7 months
Fwd: Hibernate Search 3.1.0GA Bugs after HSEARCH-160
by Emmanuel Bernard
Begin forwarded message:
> From: Zhendong Chen <chenzd(a)pds.de>
> Date: April 6, 2009 08:31:12 CEDT
> To: emmanuel(a)hibernate.org
> Subject: Hibernate Search 3.1.0GA Bugs after HSEARCH-160
> Reply-To: chenzd(a)pds.de
>
> Hibernate version: 3.3.1GA
> Hibernate Search 3.1.0GA
> Lucene 2.4.0
>
> Hallo,
>
> we have a abstract class a with annotation like this
>
> @Inheritance(strategy = InheritanceType.SINGLE_TABLE)
> @Indexed
>
> this class is annotate as a single_table, we got this exception:
> Cannot mix criteria and multiple entity types
>
> and this change was happend after HSEARCH-160.
> We have make a quick fix for this, it's not nice, maybe you can fix
> it in the next version
>
> public class SearchFactoryImpl implements SearchFactoryImplementor {
> ...
> private void initDocumentBuilders(SearchConfiguration cfg,
> ReflectionManager reflectionManager) {
> ...
> //if ( mappedXClass.isAbstract() ) {
> // log.warn( "Abstract classes can never insert index
> documents. Remove @Indexed." );
> // continue;
> //}
> ...
> }
>
> ...
>
> Set<Class<?>> getIndexedClasses(Class<?>[] classes) {
> Set<Class<?>> idexedClasses = new HashSet<Class<?>>();
> for ( Class clazz : classes ) {
>
> Inheritance inheritance = (Inheritance)
> clazz.getAnnotation(Inheritance.class);
> if(inheritance!=null &&
> inheritance.strategy().equals(InheritanceType.SINGLE_TABLE))
> {
> idexedClasses.add(clazz);
> }
> else
> {
> Set<Class<?>> set = classToIndexedClass.get( clazz );
> if ( set != null ) {
> // at this point we don't have to care about
> including indexed subclasses of a indexed class
> // MultiClassesQueryLoader will take care of this
> later and optimise the queries
> idexedClasses.addAll( set );
> }
> }
> }
> if ( log.isTraceEnabled() ) {
> log.trace( "Targeted indexed classes for {}: {}",
> Arrays.toString( classes ), idexedClasses );
> }
> return idexedClasses;
> }
> ...
> }
> --
> Zhendong Chen
> -----------------------------------------------------------------------------------------------------------------
> PDS Programm + Datenservice GmbH
> Mühlenstrasse 22 - 27356 Rotenburg (Wümme)
> Telefon: (04261) 855-01, Fax: (04261) 855-335
> E-Mail: zhendong.chen(a)pds.de, Homepage: www.pds.de
>
> Geschäftsleitung: Hinrich Hamelberg, Stephan Mau, Handelsregister
> Walsrode HRB 70186,
> Steuer-Nr.: 40/202/02809, USt-IdNr.: DE 116324331
15 years, 7 months
[Bean Validation] Cleaner package scheme
by Emmanuel Bernard
I always had in mind to do some class moving and create a cleaner
packaging structure.
I don't care about circular references between package but I do care
about:
- non overcrowded packages
- functional/feature focused packages
If you want to see some classes moved around and have some ideas on
the subject, please speak up. I will collect all proposals and see
what I can come up with them.
I have published the APIs here: http://hibernate.org/~emmanuel/validation/apidocs/
Emmanuel
15 years, 7 months