[Hibernate-JIRA] Commented: (HHH-16) Explicit joins on unrelated classes
by James Carman (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-16?page=com... ]
James Carman commented on HHH-16:
---------------------------------
Has anyone started work on this feature? I would like to give a hand (we need this feature on our project at work), but I don't want to start from scratch if someone has already done some legwork.
> Explicit joins on unrelated classes
> -----------------------------------
>
> Key: HHH-16
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-16
> Project: Hibernate3
> Issue Type: New Feature
> Components: core
> Affects Versions: antlr-rework
> Environment: Any
> Reporter: David Lloyd
> Assignee: Steve Ebersole
> Fix For: antlr-rework
>
>
> It would be nice to be able to do explicit joins on unrelated classes with HQL:
> (hope this renders correctly)
> select empl, phone
> from org.example.Employee empl
> left outer join org.example.PhoneBook phone
> on phone.lastName = empl.lastName
> and phone.firstName = empl.firstName
> where empl.salaryGrade > 10
> Note that this would also implicity solve HB-1089 because you could list join criteria that match what Hibernate would have chosen anyway (i.e., list a many-to-one relationship as a criteria explicitly).
> Syntactically this could be disambiguated from the existing join syntax because the token after "join" is a class name rather than a property name.
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (HSEARCH-112) Unkown @FullTextFilter when attempting to associate a filter
by Gerard Toonstra (JIRA)
Unkown @FullTextFilter when attempting to associate a filter
-------------------------------------------------------------
Key: HSEARCH-112
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-112
Project: Hibernate Search
Issue Type: Bug
Components: engine
Affects Versions: 3.0.0.beta4
Environment: Linux Ubuntu 7.04 / JDK 1.5.
Reporter: Gerard Toonstra
I am using Hibernate Search 3.0.0 Beta 4. This version for me offers functionality that I'd like to use, which is the "enableFullTextFilter" calls. I followed the instructions as per the example. I have multiple entities declared in my Hibernate space, but only one entity that has FullTextFilterDef settings. When searching on that entity using the Filter restriction, the "enableFullTextFilter" call results in a SearchException:
[WARN] StandardContext[]Exception while dispatching incoming RPC call
com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract net.sf.pdune.client.dto.IssueBriefDTO[] net.sf.pdune.client.services.IssueService.search(java.lang.String,int,int) throws net.sf.pdune.client.UIException' threw an unexpected exception: org.hibernate.search.SearchException: Unkown @FullTextFilter: project
at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:268)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:366)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:222)
at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:174)
I think this is due to the fact that the SearchFactoryImpl class recreates the filterDefinitions map on each call of bindFilterDefs:
public class SearchFactoryImpl implements SearchFactoryImplementor {
...
private void bindFilterDefs(XClass mappedXClass) {
filterDefinitions = new HashMap<String, FilterDef>();
...
}
My code where I am declaring the filter:
@Entity
@Table(name="ISSUE")
@Indexed(index="issue")
@FullTextFilterDef(name = IssueProjectFilterFactory.FILTER_NAME, impl = IssueProjectFilterFactory.class)
@SequenceGenerator( name="ISSUE_SEQ", sequenceName="seq_issue")
public class Issue extends PersistentObject implements Comparable
and the query code:
org.apache.lucene.search.Query luceneQuery = MultiFieldQueryParser.parse( query, Issue.FIELDS, flags, analyzer );
FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery( luceneQuery, Issue.class );
fullTextQuery.enableFullTextFilter( IssueProjectFilterFactory.FILTER_NAME ).setParameter(
IssueProjectFilterFactory.PARAM_NAME, projects );
This logically does not happen when there is only one class being mapped in Hibernate, globally, since the map would not be emptied of the others.
--
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
17 years, 4 months
[Hibernate-JIRA] Created: (HSHARDS-45) A more generic implemintation for Max, Min projections
by Aviad Lichtenstadt (JIRA)
A more generic implemintation for Max, Min projections
------------------------------------------------------
Key: HSHARDS-45
URL: http://opensource.atlassian.com/projects/hibernate/browse/HSHARDS-45
Project: Hibernate Shards
Issue Type: Bug
Components: strategy
Affects Versions: 3.0.0.Beta2
Reporter: Aviad Lichtenstadt
Assignee: Max Ross
Attachments: MaxMinProjection.txt, MaxMinProjectionTest.txt
Today the Max/Min projections do not take into consideration the field upon they should be calculated.
to use these projections the object must Implement Comparable which limits the Projection to only one way of calculating it.
but the user does insert a field name to the projection and expects a different calculation for each field (as being doe in the database).
Applying here a new algorithm so there is no need to use only comparable Objects
I am offering to use the same methodology as used in the OrderExitOperation.
build our own comparable that fits the field name set in the projection
this should be done for both max and min operations
Attached are both:
a patch with the fix
a patch with the corrected test
--
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
17 years, 4 months
[Hibernate-JIRA] Commented: (HHH-886) hbm2ddl generating too long index on MySQL
by Britt Park (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-886?page=co... ]
Britt Park commented on HHH-886:
--------------------------------
I've searched the forums and found nothing relevant. The right solution, methinks, is to extend mapping syntax to allow explicit setting of index prefix lengths even for implicit indexes such as primary keys. It's inconvenient, but easy enough to work around by hand editing generated ddl. I suggest that this either be reopened or a new enhancement request filed.
> hbm2ddl generating too long index on MySQL
> ------------------------------------------
>
> Key: HHH-886
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-886
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.0.5
> Environment: MySQL 4.1.11-standard, MyISAMI, table with default charset utf8
> Reporter: Oleg Marchuk
>
> SchemaExport log:
> alter table CountryLocal drop foreign key FK610C39952D58FB2F;
> drop table if exists CountryLocal;
> drop table if exists schedule;
> create table CountryLocal (
> id varchar(255) not null,
> name varchar(255) not null,
> lang varchar(255) not null,
> primary key (id, lang)
> );
> 17:19:59,997 ERROR SchemaExport:167 - Unsuccessful: create table CountryLocal (id varchar(255) not null, name varchar(255) not null, lang varchar(255) not null, primary key (id, lang))
> 17:20:00,003 ERROR SchemaExport:168 - Syntax error or access violation message from server: "Specified key was too long; max key length is 1000 bytes"
> create table schedule (
> id varchar(255) not null,
> primary key (id)
> );
> alter table CountryLocal
> add index FK610C39952D58FB2F (id),
> add constraint FK610C39952D58FB2F
> foreign key (id)
> references schedule (id);
> 17:20:00,014 ERROR SchemaExport:167 - Unsuccessful: alter table CountryLocal add index FK610C39952D58FB2F (id), add constraint FK610C39952D58FB2F foreign key (id) references schedule (id)
> 17:20:00,015 ERROR SchemaExport:168 - Base table or view not found message from server: "Table 'test_oleg.CountryLocal' doesn't exist"
> Mapping:
> <?xml version="1.0"?>
> <!DOCTYPE hibernate-mapping PUBLIC
> "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
> "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
> <hibernate-mapping package="com.softzonenet">
> <class name="Test" table="schedule" lazy="false">
> <id name="id" type="string">
> <generator class="assigned" />
> </id>
> <map name="names" lazy="false" table="CountryLocal"
> cascade="delete">
> <key column="id" not-null="true" />
> <map-key type="string" column="lang" />
> <element type="string" column="name" not-null="true" />
> </map>
> </class>
> </hibernate-mapping>
> Class:
> package com.softzonenet;
> public class Test {
>
> private String id = null;
>
> Test() {
>
> }
> public String getId() {
> return id;
> }
> public void setId(String id) {
> this.id = id;
> }
> }
--
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
17 years, 4 months