[Hibernate-JIRA] Created: (HSEARCH-1053) Hibernate Search Maven should compile out of the box
by Marc Schipperheyn (JIRA)
Hibernate Search Maven should compile out of the box
----------------------------------------------------
Key: HSEARCH-1053
URL: https://hibernate.onjira.com/browse/HSEARCH-1053
Project: Hibernate Search
Issue Type: Improvement
Components: build
Reporter: Marc Schipperheyn
Priority: Trivial
When you check out Hibernate Search from github, and try to maven install it, you get a bunch of errors that are caused by missing jboss maven repositories. You are supposed to add these in your settings.xml. IMHO it doesn't make any sense to have to muck about with maven settings in order to be able to use project specific repositories, unless maybe if you work there. I recommend simply adding the required repositories in the root pom.xml.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[Hibernate-JIRA] Created: (HHH-7146) Not possible to specify a SessionFactory-scoped interceptor
by Wolfram Langer (JIRA)
Not possible to specify a SessionFactory-scoped interceptor
-----------------------------------------------------------
Key: HHH-7146
URL: https://hibernate.onjira.com/browse/HHH-7146
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.1.0
Environment: Hibernate ORM 4.1.0 Final (2012-02-09)
Issue is independent of OS and DB system.
Reporter: Wolfram Langer
With the new approach to instantiate a SessionFactory (i.e. ServiceRegistryBuilder -> ServicesRegistry -> MetadataSources -> Metadata -> SessionFactory) it is not possible to define a SessionFactory-scoped interceptor.
I checked the source code and it appears that an EmptyInterceptor is hard-coded.
SessionFactoryBuilderImpl:
buildSessionFactory(MetadataImplementor metadata) {
this.metadata = metadata;
options = new SessionFactoryOptionsImpl();
}
SessionFactory buildSessionFactory() {
return new SessionFactoryImpl(metadata, options, null );
}
and instantiation of class SessionFactoryOptionsImpl has usage of the EmptyInterceptor hard-coded.
In contrast, the older code directly instantiates a SessionFactoryImpl an makes use of the interceptor that is specified in the Configuration.
My recommendations:
1.) Provide a point to specify the SessionFactory-scoped interceptor where approriate (at the ServiceRegistry?)
2.) Provide SessionFactory.setInterceptor(Interceptor) - unless this would be against the idea of configuring the SessionFactory by other means before instantiation.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[Hibernate-JIRA] Created: (HHH-7106) Documentation doesnt explain how to create audited tables
by Paul Taylor (JIRA)
Documentation doesnt explain how to create audited tables
---------------------------------------------------------
Key: HHH-7106
URL: https://hibernate.onjira.com/browse/HHH-7106
Project: Hibernate ORM
Issue Type: Bug
Components: envers
Affects Versions: 4.0.1
Reporter: Paul Taylor
The documentation doesnt explain how to create audited tables, it implies by just putting evers on your classpath (and creating event listeners on versions of hibernate earlier than 4) it will just work but it doesn't. To get it to work I add to add
config.setProperty(Environment.HBM2DDL_AUTO, "create-drop");
to my configuration, without this a call to
new SchemaExport(config).create(true, true);
would not create the audited tables.
Even now I'm not sure this is the correct way to do things but it is the only thing I've got to work. Although you might think this an unimportant issue because it is only documentation you would underestimate how difficult and fustrating it is to deleve into a new project when the documentation is inadequate, it almost led to be abandoning Envers.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[Hibernate-JIRA] Resolved: (HHH-4417) Add annotation support for UserCollectionType
by Steve Ebersole (JIRA)
[ https://hibernate.onjira.com/browse/HHH-4417?page=com.atlassian.jira.plug... ]
Steve Ebersole resolved HHH-4417.
---------------------------------
Resolution: Fixed
Fix Version/s: 4.1.1
> Add annotation support for UserCollectionType
> ---------------------------------------------
>
> Key: HHH-4417
> URL: https://hibernate.onjira.com/browse/HHH-4417
> Project: Hibernate ORM
> Issue Type: Patch
> Components: annotations
> Environment: All versions, database agnostic
> Reporter: Douglas Sjoquist
> Assignee: Steve Ebersole
> Priority: Minor
> Fix For: 4.1.1
>
> Attachments: UserCollectionTypeAnnotation.zip
>
> Original Estimate: 0.5h
> Time Spent: 0.45h
> Remaining Estimate: 0.5h
>
> Add an annotation to specify the UserCollectionType for a OneToMany or ManyToMany.
> The annotation is named CollectionTypeInfo, perhaps better named UserCollectionType, but I didn't know the standards for naming classes.
> The change to AnnotationBinder is minor and is delineated by '//dwsjoquist//' comment lines.
> Usage:
> @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
> @JoinColumn(name = "id")
> @CollectionTypeInfo(name = "examples.MyUserCollectionType")
> public List<ExampleAttribute> getExampleAttributes() {
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[Hibernate-JIRA] Created: (HHH-7122) one-to-one with cascading delete of orphans causes IllegalArugmentException
by Michael Cameron (JIRA)
one-to-one with cascading delete of orphans causes IllegalArugmentException
---------------------------------------------------------------------------
Key: HHH-7122
URL: https://hibernate.onjira.com/browse/HHH-7122
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.1.0, 3.6.10
Environment: Hibenate 3.6.x, 4.1.x (probably all since HHH-4726, but only tested on 3.6 and master branches)
Reporter: Michael Cameron
Priority: Critical
Attachments: hibernate-3.6-test-patch.diff, hibernate-master-test-patch.diff
Hibernate does not handle cascading deletes of orphans one-to-one properties.
For example in the following relationship:
{code:xml}
<class name="Employee">
<id name="id" type="long" column="id">
<generator class="increment" />
</id>
<one-to-one name="info"
property-ref="employee"
class="EmployeeInfo"
cascade="all,delete-orphan"
constrained="false" />
</class>
<class name="EmployeeInfo">
<id name="id" type="long" column="id">
<generator class="increment" />
</id>
<many-to-one name="employee"
column="employee_id"
unique="true"
not-null="true" />
</class>
{code}
If you retrieve an Employee with an EmployeeInfo from the DB, then set the employee.info to null, the first flush will correctly delete the orphan, but every flush after that in the same session will fail with an Illegal Argument Exception:
{{java.lang.IllegalArgumentException: object is not an instance of declaring class}}
I've researched the issue about as far as I can take it. The initial proximate case is that {{Cascade.cascadeProperty}} gets the entity name of the parent to pass on to the delete action. On the second call to flush, the value has been deleted, so it uses the entity name to look up the persister in {{DefaultDeleteEventListener.deleteEntity}}. It uses that persister to try to get the ID, but that's the persister of the parent class to get the ID of the child class, which fails with the exception above. I tried passing {{null}} in as the entityName so it would look up the persister using just the object, but that fails because then the delete has nothing to delete (it actually has been deleted already). That helped me understand the issue better.
In this case, the loadedState of the parent remains in place after the cascaded delete of the child because none of it's direct properties changes. So after the initial flush with the delete of the child, the next flush will still find the child object in the loaded state, but it is no longer in the session's persistence context, and it fails with the IllegalArgumentException above.
I don't know the hibernate internals above, so I don't know if the direct solution I'm thinking of would work: update the loaded state of the parent in {{Cascade.cascadeProperty}} after it calls {{eventSource.delete}}. Is this too direct? Does it need to happen with the action queue is actually executed? Is there enough information upon execution of this child to update the parent like EntityInsertAction and EntityUpdateAction?
I've attached patch files the 3.6 and master branch with tests that fail because of this issue. I wouldn't mind making changes to fix the problem and submitting a pull request, but I'll need guidance on how to approach it.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months
[Hibernate-JIRA] Updated: (HHH-4417) Add annotation support for UserCollectionType
by Steve Ebersole (JIRA)
[ https://hibernate.onjira.com/browse/HHH-4417?page=com.atlassian.jira.plug... ]
Steve Ebersole updated HHH-4417:
--------------------------------
Assignee: Steve Ebersole
> Add annotation support for UserCollectionType
> ---------------------------------------------
>
> Key: HHH-4417
> URL: https://hibernate.onjira.com/browse/HHH-4417
> Project: Hibernate ORM
> Issue Type: Patch
> Components: annotations
> Environment: All versions, database agnostic
> Reporter: Douglas Sjoquist
> Assignee: Steve Ebersole
> Priority: Minor
> Attachments: UserCollectionTypeAnnotation.zip
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> Add an annotation to specify the UserCollectionType for a OneToMany or ManyToMany.
> The annotation is named CollectionTypeInfo, perhaps better named UserCollectionType, but I didn't know the standards for naming classes.
> The change to AnnotationBinder is minor and is delineated by '//dwsjoquist//' comment lines.
> Usage:
> @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL)
> @JoinColumn(name = "id")
> @CollectionTypeInfo(name = "examples.MyUserCollectionType")
> public List<ExampleAttribute> getExampleAttributes() {
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 10 months