[Hibernate-JIRA] Created: (HSEARCH-528) MassIndexer attempts to index non-indexed subclasses of indexed types
by Sanne Grinovero (JIRA)
MassIndexer attempts to index non-indexed subclasses of indexed types
---------------------------------------------------------------------
Key: HSEARCH-528
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-528
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.2.0.Final, 3.2.0.CR1, 3.2.0.Beta1
Reporter: Sanne Grinovero
Fix For: 3.3.0
quoting comments from HSEARCH-526:
j nadler :
{quote}Sanne,
I have @Indexed class Parent, @Indexed class Child1 extends Parent, @Indexed class Child2 extends Parent, unindexed class Child3 extends Parent.
I create an indexer fullTextEntityManager.createIndexer(Parent.class), it seems that it then fetches all Parent entities. This includes all Child3 entities but Child3 is not indexed. It seems like the MassIndexer attempts to index them anyway.
Best behavior might be to ignore these (explicitly check if the concrete subtype is @Indexed, skip that record if not, possibly log a warning) or as you say it could at least throw an error that makes it clear what the developer (me) did wrong.
Thanks!
{quote}
Emmanuel Bernard :
{quote}Ah, right. Sanne, you should use the same algorithm we use in the query building process to check the list of indexed subclasses to create the list of indexes to merge.{quote}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months
[Hibernate-JIRA] Created: (HHH-4072) ManyToMany with single table inheritance fails when multiple subclasses
by david sinclair (JIRA)
ManyToMany with single table inheritance fails when multiple subclasses
-----------------------------------------------------------------------
Key: HHH-4072
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4072
Project: Hibernate Core
Issue Type: Bug
Components: envers
Affects Versions: 3.3.2
Environment: Windows XP, Java 1.6
Reporter: david sinclair
Priority: Critical
I have a base entity named BusinessSoftwareMatrixElement declare as such
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name = "software_type", discriminatorType = DiscriminatorType.STRING)
@DiscriminatorValue("Software")
@Audited
BusinessSoftwareMatrixElement ...{ }
I then have a subclass of BusinessSoftwareMatrixElement that is a mapped super class which defines a many to many relationship.
@MappedSuperclass
@Audited
public abstract class BusinessOSProcessServiceMatrixElement extends BusinessSoftwareMatrixElement {
private Set<BusinessOSMatrixElement> applicableOperatingSystems = new HashSet<BusinessOSMatrixElement>();
@ManyToMany(fetch = FetchType.LAZY, cascade = {CascadeType.REMOVE, CascadeType.REFRESH }, targetEntity = BusinessOSMatrixElement.class)
@JoinTable(name="matrix_elements_procserv_aos",
joinColumns=@JoinColumn(name="sw_guid"),
inverseJoinColumns = @JoinColumn(name="os_guid"))
public Set<BusinessOSMatrixElement> getApplicableOperatingSystems() {
return applicableOperatingSystems;
}
}
There are then to subclasses that add no new fields, only different discriminators
@Entity
@DiscriminatorValue("Database")
@Audited
public class BusinessDBMatrixElement extends BusinessOSProcessServiceMatrixElement {
@Entity
@DiscriminatorValue("Application")
@Audited
public class BusinessAppMatrixElement extends BusinessOSProcessServiceMatrixElement {
Running the ant task to create the DDL results in an exception being thrown for that many to many table.
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping matrix_elements_procserv_aos_AUD
at org.hibernate.tool.ant.HibernateToolTask.reportException(HibernateToolTask.java:226)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:189)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108)
... 24 more
Caused by: org.hibernate.DuplicateMappingException: Duplicate class/entity mapping matrix_elements_procserv_aos_AUD
at org.hibernate.cfg.Mappings.addClass(Mappings.java:141)
at org.hibernate.cfg.HbmBinder.bindRoot(HbmBinder.java:167)
at org.hibernate.cfg.Configuration.add(Configuration.java:716)
at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:531)
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:291)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1162)
at org.hibernate.envers.configuration.AuditConfiguration.getFor(AuditConfiguration.java:102)
at org.hibernate.envers.ant.AnnotationConfigurationTaskWithEnvers.doConfiguration(AnnotationConfigurationTaskWithEnvers.java:38)
at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:55)
at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:302)
at org.hibernate.tool.ant.Hbm2DDLExporterTask.createExporter(Hbm2DDLExporterTask.java:51)
at org.hibernate.tool.ant.ExporterTask.execute(ExporterTask.java:39)
at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:186)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months
[Hibernate-JIRA] Created: (HHH-2835) Setting org.hibernate.type logging to debug produces no logging
by Jeremy Grodberg (JIRA)
Setting org.hibernate.type logging to debug produces no logging
---------------------------------------------------------------
Key: HHH-2835
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2835
Project: Hibernate3
Issue Type: Bug
Components: core, documentation
Affects Versions: 3.2.5, 3.2.4
Environment: Hibernate 3.2.4.ga and Hibernate 3.2.5.ga with MySQL5Dialect (configured with Hibernate Annotations 3.3.0.ga and Spring 2.0.6)
Reporter: Jeremy Grodberg
Priority: Minor
According to the online documentation (labeled as version 3.2.2 at this moment), Table 3.9 "Hibernate Log Categories", as viewed here today:
http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configurat...
Setting the log4j category "org.hibernate.type" to debug should "Log all JDBC parameters". However, it produces no output at all.
When I go on to set "org.hibernate" to debug, I get output like this:
DEBUG: org.hibernate.jdbc.AbstractBatcher - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
DEBUG: org.hibernate.SQL - select count(*) from album where genreID=?
DEBUG: org.hibernate.loader.Loader - bindNamedParameters() 126 -> genreId [1]
DEBUG: org.hibernate.jdbc.AbstractBatcher - about to open ResultSet (open ResultSets: 0, globally: 0)
DEBUG: org.hibernate.loader.Loader - result row:
DEBUG: org.hibernate.jdbc.AbstractBatcher - about to close ResultSet (open ResultSets: 1, globally: 1)
DEBUG: org.hibernate.jdbc.AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
Note that the JDBC parameters are logged under org.hibernate.loader but nothing appears under org.hibernate.type. FYI, genreId is, in this case, a Long.
Perhaps this is expected/desired when using annotations? If so, then please update the documentation. If not, please restore the logging.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months
[Hibernate-JIRA] Created: (HHH-2228) ant eg fails - bad release notes quick start
by Brian Brooks (JIRA)
ant eg fails - bad release notes quick start
--------------------------------------------
Key: HHH-2228
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2228
Project: Hibernate3
Type: Bug
Components: documentation
Versions: 3.2.0.ga
Environment: hibernate 3.2.0.ga
Microsoft Windows XP [Version 5.1.2600]
java version "1.5.0_07"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode)
Reporter: Brian Brooks
Priority: Minor
The hibernate 3.2.0.ga release notes
http://sourceforge.net/project/shownotes.php?release_id=455849&group_id=4...
read as
Get Up And Running Quick
------------------------
Demo:
(1) copy your JDBC driver to the lib directory
(2) edit etc/hibernate.properties
(3) run "ant eg" or "build eg"
(4) browse the sourcecode in eg/org/hibernate/auction
This directions are incorrect. Below is the ant output if these steps are followed. Also, I had to put junit*.jar and antlr*all*.jar in my ANT_HOME/lib before ant eg would work.
C:\hibernate-3.2>ant eg
Buildfile: build.xml
[taskdef] Could not load definitions from resource clovertasks. It could not b
e found.
eg:
[javac] Compiling 8 source files to C:\hibernate-3.2\build\eg
[javac] C:\hibernate-3.2\eg\org\hibernate\auction\Main.java:10: cannot find
symbol
[javac] symbol : class FetchMode
[javac] location: package org.hibernate
[javac] import org.hibernate.FetchMode;
[javac] ^
[javac] C:\hibernate-3.2\eg\org\hibernate\auction\Main.java:11: cannot find
symbol
[javac] symbol : class FlushMode
[javac] location: package org.hibernate
[javac] import org.hibernate.FlushMode;
[javac] ^
[javac] C:\hibernate-3.2\eg\org\hibernate\auction\Main.java:12: cannot find
symbol
[javac] symbol : class LockMode
[javac] location: package org.hibernate
[javac] import org.hibernate.LockMode;
[javac] ^
....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
14 years, 2 months
[Hibernate-JIRA] Created: (HV-307) Support @Past/@Future annotations at types from the Joda Time API
by Gunnar Morling (JIRA)
Support @Past/@Future annotations at types from the Joda Time API
-----------------------------------------------------------------
Key: HV-307
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-307
Project: Hibernate Validator
Issue Type: New Feature
Affects Versions: 4.1.0
Reporter: Gunnar Morling
Assignee: Hardy Ferentschik
Background:
===========
The Bean Validation API specifies the annotations @Past and @Future, which are allowed at the JDK types Date and Calendar.
Due to several issues and restrictions of these JDK types the open-source Joda Time API (http://joda-time.sourceforge.net/) which provides alternative date/time types became quite popular within the last years.
To do:
======
* Hibernate Validator should add support for @Past/@Future for the Joda API date/times types by providing ConstraintValidator implementations for these types.
* The Joda Time API should be added as optional dependency to HV. Upon runtime HV should check reflectively if Joda is on the class path. If that's the case, the Joda validators should be registered.
* The HV reference guide should mention the additional types at which the @Past/@Future are supported.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months
[Hibernate-JIRA] Created: (HHH-3834) Exception: cast() requires two arguments
by Paulo Angelo (JIRA)
Exception: cast() requires two arguments
----------------------------------------
Key: HHH-3834
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3834
Project: Hibernate Core
Issue Type: Bug
Environment: hibernate3, postgresql 8.3
Reporter: Paulo Angelo
Got exaclty the same as in HHH-3285 .:
cast() requires two arguments [select f from MenuItem f where ( ( UPPER( TO_ASCII(CAST(convert(f.Menu.Idme, 'UTF8', 'LATIN1') , TEXT),'LATIN1')) LIKE UPPER( TO_ASCII(CAST(convert('M10', 'UTF8', 'LATIN1') , TEXT),'LATIN1')) ) ) order by f.Orde ASC ]
But there is not a extra ")" (I think, :) )
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 2 months