You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: torrance (JIRA) <no...@at...> - 2006-06-13 15:48:35
|
problem creating SessionFactory ------------------------------- Key: HBX-687 URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-687 Project: Hibernate Tools Type: Bug Components: reverse-engineer, eclipse, consoleconfiguration Versions: 3.1.beta5 Environment: Eclipse 3.1.2 Hibernate 3.1.3 Oracle 10g Reporter: torrance I created a configuration file and console configuration succefully . I also generated Java code succefully from existing Oracle DB through JDBC. But when I tried to create a SessionFactory in Hibernate Console. I got following error: Mapping documents: Code between sessionFactory.openSession() and session.close(): java.lang.NullPointerException at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getRawLocationFile(ClassLoaderHelper.java:91) at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getRawLocationURL(ClassLoaderHelper.java:83) at org.hibernate.eclipse.console.utils.ClassLoaderHelper.getRawLocationsURLForResources(ClassLoaderHelper.java:117) at org.hibernate.eclipse.console.EclipseConsoleConfigurationPreferences.getCustomClassPathURLS(EclipseConsoleConfigurationPreferences.java:81) at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:109) at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:98) at org.hibernate.eclipse.console.actions.BuildSessionFactoryAction.doRun(BuildSessionFactoryAction.java:37) at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:46) at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:167) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3125) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-13 14:31:36
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-373?page=comments#action_23327 ] Emmanuel Bernard commented on ANN-373: -------------------------------------- Annotations register a entity class so that the fqcn or the entity name can be used in a query. I've some working tests. What specifically fails? note that the entity name is @Entity(name) which default to the uqcn > imports are not done for the full entityname > -------------------------------------------- > > Key: ANN-373 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-373 > Project: Hibernate Annotations > Type: Improvement > Components: binder > Reporter: Max Rydahl Andersen > Priority: Minor > > > hbmbinder adds both the simple and fully qualified name into imports. > annotationbinder does not. > e.g. > org.jbossworld.Patient should be added as both "Patient" and "org.jbossworld.Patient" to be aligned with hbmbinder. > hql code completion assumes this. > workaround is to do two looksup instead, one in imports and if that return null do a lookup directly in classmappings -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-06-13 06:47:39
|
imports are not done for the full entityname -------------------------------------------- Key: ANN-373 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-373 Project: Hibernate Annotations Type: Improvement Components: binder Reporter: Max Rydahl Andersen Priority: Minor hbmbinder adds both the simple and fully qualified name into imports. annotationbinder does not. e.g. org.jbossworld.Patient should be added as both "Patient" and "org.jbossworld.Patient" to be aligned with hbmbinder. hql code completion assumes this. workaround is to do two looksup instead, one in imports and if that return null do a lookup directly in classmappings -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Bill S. (JIRA) <no...@at...> - 2006-06-12 19:45:36
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-989?page=comments#action_23324 ] Bill Schneider commented on HHH-989: ------------------------------------ It may also be helpful to add a note that implicit joins always appear to be inner joins. in particular consider: "cat.mate.name= ? OR cat.name=?" if cat.mate is null, this will not return any results, EVEN IF the right hand cat.name=? expression matches. this is a little counter-intuitive looking at this from a Java beans/introspection perspective, because a similar condition in JSTL (<c:if test="${cat.mate.name = ... || cat.name = ...}">) would behave differently. > add discussion of implicit and explcit joins > -------------------------------------------- > > Key: HHH-989 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-989 > Project: Hibernate3 > Type: Improvement > Components: documentation > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Priority: Minor > Fix For: 3.1 rc 1 > > > Since we use the terms "implicit join" and "explicit join", we should at least have a discussion of the meaning of these in the hql reference doc. > I was unable to find any mention of either... -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-12 16:58:36
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-370?page=all ] Emmanuel Bernard resolved ANN-370: ---------------------------------- Resolution: Fixed > Lucene updates are not thread safe > ---------------------------------- > > Key: ANN-370 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-370 > Project: Hibernate Annotations > Type: Bug > Components: lucene > Versions: 3.2.0.cr1 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.2.0 > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-12 16:58:36
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-372?page=all ] Emmanuel Bernard resolved ANN-372: ---------------------------------- Resolution: Fixed > @Boost factor on document and fields > ------------------------------------ > > Key: ANN-372 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-372 > Project: Hibernate Annotations > Type: New Feature > Components: lucene > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.2.0 > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-12 16:58:36
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-371?page=all ] Emmanuel Bernard resolved ANN-371: ---------------------------------- Resolution: Fixed > Abstract DocumentBuilder from the underlying Directory implementation > --------------------------------------------------------------------- > > Key: ANN-371 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-371 > Project: Hibernate Annotations > Type: Improvement > Components: lucene > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Fix For: 3.2.0 > > -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-12 16:56:31
|
@Boost factor on document and fields ------------------------------------ Key: ANN-372 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-372 Project: Hibernate Annotations Type: New Feature Components: lucene Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Fix For: 3.2.0 -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-12 16:54:31
|
Abstract DocumentBuilder from the underlying Directory implementation --------------------------------------------------------------------- Key: ANN-371 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-371 Project: Hibernate Annotations Type: Improvement Components: lucene Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Fix For: 3.2.0 -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-06-12 16:52:34
|
Lucene updates are not thread safe ---------------------------------- Key: ANN-370 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-370 Project: Hibernate Annotations Type: Bug Components: lucene Versions: 3.2.0.cr1 Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Fix For: 3.2.0 -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Per-Olov W. (JIRA) <no...@at...> - 2006-06-12 14:18:33
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1819?page=comments#action_23323 ] Per-Olov Wingren commented on HHH-1819: --------------------------------------- I have also this problem. I have a Node class which has a 1 to 1 relationship to an Address. The Address has a Map, addressLines, where the both keys and values are Strings. I run a query on Nodes like: "where this.addressLines['GlobalLocationId']='link'" In the select statement created by Hibernate, the where clause refers to an alias that is never defined. This problem occures when using the new ASTQueryTranslatorFactory. My current workaround is to use org.hibernate.hql.classic.ClassicQueryTranslatorFactory, which works perfectly well. I use Oracle 10.2, Hibernate 3.1.3. > Invalid SQL generated for mapping with property-ref > --------------------------------------------------- > > Key: HHH-1819 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1819 > Project: Hibernate3 > Type: Bug > Components: query-hql > Versions: 3.1.3 > Environment: Oracle 8.1.7 > Reporter: Jakub Mendys > Priority: Critical > > > Consider mappings: > <class name="MedDRATerm" table="MBROW_MEDDRA_TERMS" mutable="false" > batch-size="50"> > <cache usage="read-only" region="dictionary" /> > <id name="medDRATermId" type="long" column="TERM_ID"> > <generator class="assigned" /> > </id> > <map name="termNames" table="MBROW_TERM_NAMES" lazy="true" > batch-size="50"> > <cache usage="read-only" region="dictionary" /> > <key column="MEDDRA_CODE" property-ref="medDRACode" /> > <index column="LANGUAGE_ID" > type="com.roche.dss.meddra.dao.type.LanguageType" /> > <element column="NAME" type="string" /> > </map> > <property name="medDRACode" column="MEDDRA_CODE" > type="com.roche.dss.meddra.dao.type.MedDRACodeType" /> > </class> > <class name="MedDRATermInstance" table="MBROW_MEDDRA_TREES" > mutable="false"> > <cache usage="read-only" region="dictionary" /> > <id name="medDRATermInstanceId" type="long" column="NODE_ID"> > <generator class="assigned" /> > </id> > <many-to-one name="medDRATerm" class="MedDRATerm" > column="TERM_ID" fetch="join" not-null="true" insert="false" > update="false" /> > </class> > and a HQL query: > from MedDRATermInstance i where i.medDRATermInstanceId is not null and i.medDRATerm.termNames[1] like 'headache' > Having this Hibernate will generate following SQL: > SELECT ... > FROM orcl_gthes.mbrow_meddra_trees meddraterm0_, > orcl_gthes.mbrow_term_names termnames2_ > WHERE meddraterm1_.meddra_code = termnames2_.meddra_code > AND termnames2_.language_id = 1 > AND meddraterm0_.term_id = meddraterm1_.term_id > AND (termnames2_.NAME LIKE 'headache') > Please note that WHERE clause refers to alias meddraterm1_ which is not mentioned in FROM section!!!! -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Martin (JIRA) <no...@at...> - 2006-06-12 13:30:41
|
@CollectionOfElements on a Map uses reserved word "key" as column name ---------------------------------------------------------------------- Key: ANN-369 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-369 Project: Hibernate Annotations Type: Bug Components: binder Versions: 3.2.0.cr1 Environment: Hibernate 3.2.0cr1, MySQL 5 Reporter: Martin This annotation [User.java] @CollectionOfElements public Map<String, String> getMisc() results in this create table statement: create table User_misc (User_id bigint not null, element varchar(255), key varchar(255), primary key (User_id, key)) type=InnoDB But "KEY" is a reserved word, so MySQL won't create that table. The default column name should either change or be enclosed by backticks. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-06-12 13:15:36
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1832?pa= ge=3Dcomments#action_23322 ]=20 Christian Bauer commented on HHH-1832: -------------------------------------- English code/tests would make this a lot easier to test as well. > Expression.in on component object gives parameters til SQL in wrong order= . > -------------------------------------------------------------------------= - > > Key: HHH-1832 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= HH-1832 > Project: Hibernate3 > Type: Bug > Components: query-criteria > Versions: 3.1.2 > Environment: Development in IntellIJ IDEA 4.5.3 > Database:Oracle 10g Enteprise Edition release 10.1.0.2.0=20 > Reporter: Thomas Andersen > > > I'm using an Expression.in on a component class with two attributes (one = Long and one String). When executing the code I an empty list. > When using the generated SQL in DBVisualizer adding the variables it retu= rns the expectet list. > Debug log level and reveals (detailed documentation later in description)= : > Parameters are bound in the wrong order: > Paramters are bound > ... where (this_.ejerlavskode, this_.matrikelnr) in ((9999, 9999), (01, 0= 3)) > should be 9999, 01, 9999, 03 according to=20 > ... where (this_.ejerlavskode, this_.matrikelnr) in ((9999, 01), (9999, 0= 3)) > Parameter pairs are by class Matrikelbetegnelse(ejerlavskode=3D9999, matr= ikenr=3D01) > Hibernate version: > Hibernate 3.1.2 > Mapping documents: > <?xml version=3D"1.0" encoding=3D"UTF-8"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > <hibernate-mapping > <class > name=3D"Sagsadvarsel" > table=3D"sagsadvarsel" > > > <id > name=3D"id" > column=3D"id" > type=3D"long" > > > <generator class=3D"native"> > <param name=3D"sequence">sagsadvarsel_id_seq</param> > </generator> > </id> > <version > name=3D"version" > column=3D"version" > type=3D"long" > /> > <property > name=3D"datoTid" > type=3D"java.util.Date" > update=3D"true" > insert=3D"true" > column=3D"datoTid" > not-null=3D"false" > /> > <component > name=3D"matrikelbetegnelse" > class=3D"Matrikelbetegnelse" > > > <property > name=3D"ejerlavskode" > type=3D"java.lang.Long" > update=3D"true" > insert=3D"true" > column=3D"ejerlavskode" > /> > <property > name=3D"matrikelnr" > type=3D"java.lang.String" > update=3D"true" > insert=3D"true" > column=3D"matrikelnr" > length=3D"20" > /> > </component> > </class> > </hibernate-mapping> > Code between sessionFactory.openSession() and session.close(): > Long ejerlav =3D new Long(9999); > final Matrikelbetegnelse[] matrikelbetegnelser =3D new Matrikelbetegnelse= [2]; > matrikelbetegnelser[0] =3D new Matrikelbetegnelse(ejerlav, "01"); > matrikelbetegnelser[1] =3D new Matrikelbetegnelse(ejerlav, "03"); > List list =3D session.createCriteria(Sagsadvarsel.class) > .add(Expression.in("matrikelbetegnelse",matrikelbetegnelser)) > .list(); > log.debug("list " + list.size()); > import java.util.Date; > import java.io.Serializable; > /** > * @hibernate.class table=3D"sagsadvarsel" > */ > public class Sagsadvarsel implements Serializable{ > private long id; > private long version; > private Date datoTid; > private Matrikelbetegnelse matrikelbetegnelse; > /** > * @return > * @hibernate.id generator-class=3D"native" > */ > public long getId() { > return id; > } > public void setId(long id) { > this.id =3D id; > } > /** > * Udlever versionsnummer for forekomsten. Feltet ajourf=C3=B8res af Hiber= nate, som samtidig bruger det til at > * forhindre samtidig opdatering fra to processer. > * hibernate.version > * @return > */ > public long getVersion() { > return version; > } > public void setVersion(long version) { > this.version =3D version; > } > /** > * Udlever datotid (Dato og tidspunkt for sagsadvarsel). > * > * @hibernate.property not-null=3D"false" > * @return datotid > */ > public Date getDatoTid() { > return datoTid; > } > public void setDatoTid(Date datoTid) { > this.datoTid =3D datoTid; > } > /** > * Udlever Matrikelbetegnelse. > * > * @hibernate.component > */ > public Matrikelbetegnelse getMatrikelbetegnelse() { > return matrikelbetegnelse; > } > public void setMatrikelbetegnelse(Matrikelbetegnelse matrikelbetegnelse) = { > this.matrikelbetegnelse =3D matrikelbetegnelse; > } > } > import java.io.Serializable; > /** > */ > public class Matrikelbetegnelse { > private Long ejerlavskode ; > private String matrikelnr ; > public Matrikelbetegnelse() { > } > public Matrikelbetegnelse(Long ejerlavskode, String matrikelnummer) { > this.ejerlavskode =3D ejerlavskode; > this.matrikelnr =3D matrikelnummer; > } > /** > * > * @return > * @hibernate.property > */ > public Long getEjerlavskode() { > return ejerlavskode; > } > public void setEjerlavskode(Long ejerlavskode) { > this.ejerlavskode =3D ejerlavskode; > } > /** > * > * @return > * @hibernate.property length=3D"20" > */ > public String getMatrikelnr() { > return matrikelnr; > } > public void setMatrikelnr(String matrikelnr) { > this.matrikelnr =3D matrikelnr; > } > public boolean equals(Object o) { > if (this =3D=3D o) return true; > if (!(o instanceof Matrikelbetegnelse)) return false; > final Matrikelbetegnelse matrikelbetegnelse =3D (Matrikelbetegnelse) o; > if (!ejerlavskode.equals(matrikelbetegnelse.ejerlavskode)) return false; > if (!matrikelnr.equals(matrikelbetegnelse.matrikelnr)) return false; > return true; > } > public int hashCode() { > int result; > result =3D ejerlavskode.hashCode(); > result =3D 29 * result + matrikelnr.hashCode(); > return result; > } > } > Full stack trace of any exception that occurs: > No exception, just an empty result. > Name and version of the database you are using: > Oracle 10g Enteprise Edition release 10.1.0.2.0 > The generated SQL (show_sql=3Dtrue): > Hibernate: select this_.id as id34_0_, this_.datoTid as datoTid34_0_, thi= s_.ejerlavskode as ejerlavs3_34_0_, this_.matrikelnr as matrikelnr34_0_, th= is_.fk_sag_id as fk5_34_0_, this_.brugerId as brugerId34_0_, this_.tidsstem= pel as tidsstem7_34_0_, this_.gyldig_fra as gyldig8_34_0_, this_.gyldig_til= as gyldig9_34_0_, this_.oprind_id as oprind10_34_0_ from tan.sagsadvarsel = this_ where (this_.ejerlavskode, this_.matrikelnr) in ((?, ?), (?, ?)) > Debug level Hibernate log excerpt: > 14:02:58,631 DEBUG [CID=3D ] [org.hibernate.jdbc.AbstractBatcher.log(Abst= ractBatcher.java:346)] select this_.id as id34_1_, this_.version as version= 34_1_, this_.datoTid as datoTid34_1_, this_.ejerlavskode as ejerlavs4_34_1_= , this_.matrikelnr as matrikelnr34_1_, this_.fk_sag_id as fk6_34_1_, this_.= brugerId as brugerId34_1_, this_.tidsstempel as tidsstem8_34_1_, this_.gyld= ig_fra as gyldig9_34_1_, this_.gyldig_til as gyldig10_34_1_, this_.oprind_i= d as oprind11_34_1_, s1_.id as id15_0_, s1_.version as version15_0_, s1_.sa= gsId as sagsId15_0_, s1_.symbolskNavn as symbolsk4_15_0_, s1_.kms_journalnu= mmer as kms5_15_0_, s1_.journaliseringsDato as journali6_15_0_, s1_.rekvire= ntRef as rekviren7_15_0_, s1_.enum_sagskategori as enum8_15_0_, s1_.enum_pr= ioritet as enum9_15_0_, s1_.tidsfrist as tidsfrist15_0_, s1_.saerligAftale = as saerlig11_15_0_, s1_.matrikelnr as matrikelnr15_0_, s1_.ejerlavskode as = ejerlav13_15_0_, s1_.afventAntalHoeringssvar as afventA14_15_0_, s1_.afvent= AntalSupplDok as afventA15_15_0_, s1_.maaIkkeSlettes as maaIkke16_15_0_, s1= _.erForaeldet as erForae17_15_0_, s1_.brugerId as brugerId15_0_, s1_.tidsst= empel as tidsste19_15_0_, s1_.gyldig_fra as gyldig20_15_0_, s1_.gyldig_til = as gyldig21_15_0_, s1_.oprind_id as oprind22_15_0_, s1_.fk_aktoer_indsender= _id as fk23_15_0_, s1_.fk_aktoer_rekvirent_id as fk24_15_0_, s1_.fk_aktoer_= revisor_id as fk25_15_0_, s1_.fk_sagsbehandlerteam_id as fk26_15_0_, s1_.fk= _sagspakke_id as fk27_15_0_, s1_.fk_sagsresume_id as fk28_15_0_, s1_.aflysn= ingsmeddelelse as aflysni29_15_0_, s1_.fk_samlesag_id as fk30_15_0_ from ta= n.sagsadvarsel this_ inner join tan.sag s1_ on this_.fk_sag_id=3Ds1_.id whe= re (this_.ejerlavskode, this_.matrikelnr) in ((?, ?), (?, ?)) and not s1_.s= agsId=3D? order by this_.fk_sag_id asc, this_.ejerlavskode asc, this_.matri= kelnr asc > Hibernate: select this_.id as id34_1_, this_.version as version34_1_, thi= s_.datoTid as datoTid34_1_, this_.ejerlavskode as ejerlavs4_34_1_, this_.ma= trikelnr as matrikelnr34_1_, this_.fk_sag_id as fk6_34_1_, this_.brugerId a= s brugerId34_1_, this_.tidsstempel as tidsstem8_34_1_, this_.gyldig_fra as = gyldig9_34_1_, this_.gyldig_til as gyldig10_34_1_, this_.oprind_id as oprin= d11_34_1_, s1_.id as id15_0_, s1_.version as version15_0_, s1_.sagsId as sa= gsId15_0_, s1_.symbolskNavn as symbolsk4_15_0_, s1_.kms_journalnummer as km= s5_15_0_, s1_.journaliseringsDato as journali6_15_0_, s1_.rekvirentRef as r= ekviren7_15_0_, s1_.enum_sagskategori as enum8_15_0_, s1_.enum_prioritet as= enum9_15_0_, s1_.tidsfrist as tidsfrist15_0_, s1_.saerligAftale as saerlig= 11_15_0_, s1_.matrikelnr as matrikelnr15_0_, s1_.ejerlavskode as ejerlav13_= 15_0_, s1_.afventAntalHoeringssvar as afventA14_15_0_, s1_.afventAntalSuppl= Dok as afventA15_15_0_, s1_.maaIkkeSlettes as maaIkke16_15_0_, s1_.erForael= det as erForae17_15_0_, s1_.brugerId as brugerId15_0_, s1_.tidsstempel as t= idsste19_15_0_, s1_.gyldig_fra as gyldig20_15_0_, s1_.gyldig_til as gyldig2= 1_15_0_, s1_.oprind_id as oprind22_15_0_, s1_.fk_aktoer_indsender_id as fk2= 3_15_0_, s1_.fk_aktoer_rekvirent_id as fk24_15_0_, s1_.fk_aktoer_revisor_id= as fk25_15_0_, s1_.fk_sagsbehandlerteam_id as fk26_15_0_, s1_.fk_sagspakke= _id as fk27_15_0_, s1_.fk_sagsresume_id as fk28_15_0_, s1_.aflysningsmeddel= else as aflysni29_15_0_, s1_.fk_samlesag_id as fk30_15_0_ from tan.sagsadva= rsel this_ inner join tan.sag s1_ on this_.fk_sag_id=3Ds1_.id where (this_.= ejerlavskode, this_.matrikelnr) in ((?, ?), (?, ?)) and not s1_.sagsId=3D? = order by this_.fk_sag_id asc, this_.ejerlavskode asc, this_.matrikelnr asc > 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.jdbc.AbstractBatcher.getPrepa= redStatement(AbstractBatcher.java:424)] preparing statement > 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet= (NullableType.java:79)] binding '9999' to parameter: 1 > 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet= (NullableType.java:79)] binding '9999' to parameter: 2 > 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet= (NullableType.java:79)] binding '01' to parameter: 3 > 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet= (NullableType.java:79)] binding '03' to parameter: 4 > 14:02:58,701 DEBUG [CID=3D ] [org.hibernate.jdbc.AbstractBatcher.logOpenR= esults(AbstractBatcher.java:327)] about to open ResultSet (open ResultSets:= 0, globally: 0) --=20 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= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-06-12 13:15:36
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1832?pa= ge=3Dcomments#action_23321 ]=20 Christian Bauer commented on HHH-1832: -------------------------------------- Reduce this to an ISOLATED test case, so somebody doesn't need an hour to f= ind out if this is a problem or not. > Expression.in on component object gives parameters til SQL in wrong order= . > -------------------------------------------------------------------------= - > > Key: HHH-1832 > URL: http://opensource.atlassian.com/projects/hibernate/browse/H= HH-1832 > Project: Hibernate3 > Type: Bug > Components: query-criteria > Versions: 3.1.2 > Environment: Development in IntellIJ IDEA 4.5.3 > Database:Oracle 10g Enteprise Edition release 10.1.0.2.0=20 > Reporter: Thomas Andersen > > > I'm using an Expression.in on a component class with two attributes (one = Long and one String). When executing the code I an empty list. > When using the generated SQL in DBVisualizer adding the variables it retu= rns the expectet list. > Debug log level and reveals (detailed documentation later in description)= : > Parameters are bound in the wrong order: > Paramters are bound > ... where (this_.ejerlavskode, this_.matrikelnr) in ((9999, 9999), (01, 0= 3)) > should be 9999, 01, 9999, 03 according to=20 > ... where (this_.ejerlavskode, this_.matrikelnr) in ((9999, 01), (9999, 0= 3)) > Parameter pairs are by class Matrikelbetegnelse(ejerlavskode=3D9999, matr= ikenr=3D01) > Hibernate version: > Hibernate 3.1.2 > Mapping documents: > <?xml version=3D"1.0" encoding=3D"UTF-8"?> > <!DOCTYPE hibernate-mapping PUBLIC > "-//Hibernate/Hibernate Mapping DTD 3.0//EN" > "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> > <hibernate-mapping > <class > name=3D"Sagsadvarsel" > table=3D"sagsadvarsel" > > > <id > name=3D"id" > column=3D"id" > type=3D"long" > > > <generator class=3D"native"> > <param name=3D"sequence">sagsadvarsel_id_seq</param> > </generator> > </id> > <version > name=3D"version" > column=3D"version" > type=3D"long" > /> > <property > name=3D"datoTid" > type=3D"java.util.Date" > update=3D"true" > insert=3D"true" > column=3D"datoTid" > not-null=3D"false" > /> > <component > name=3D"matrikelbetegnelse" > class=3D"Matrikelbetegnelse" > > > <property > name=3D"ejerlavskode" > type=3D"java.lang.Long" > update=3D"true" > insert=3D"true" > column=3D"ejerlavskode" > /> > <property > name=3D"matrikelnr" > type=3D"java.lang.String" > update=3D"true" > insert=3D"true" > column=3D"matrikelnr" > length=3D"20" > /> > </component> > </class> > </hibernate-mapping> > Code between sessionFactory.openSession() and session.close(): > Long ejerlav =3D new Long(9999); > final Matrikelbetegnelse[] matrikelbetegnelser =3D new Matrikelbetegnelse= [2]; > matrikelbetegnelser[0] =3D new Matrikelbetegnelse(ejerlav, "01"); > matrikelbetegnelser[1] =3D new Matrikelbetegnelse(ejerlav, "03"); > List list =3D session.createCriteria(Sagsadvarsel.class) > .add(Expression.in("matrikelbetegnelse",matrikelbetegnelser)) > .list(); > log.debug("list " + list.size()); > import java.util.Date; > import java.io.Serializable; > /** > * @hibernate.class table=3D"sagsadvarsel" > */ > public class Sagsadvarsel implements Serializable{ > private long id; > private long version; > private Date datoTid; > private Matrikelbetegnelse matrikelbetegnelse; > /** > * @return > * @hibernate.id generator-class=3D"native" > */ > public long getId() { > return id; > } > public void setId(long id) { > this.id =3D id; > } > /** > * Udlever versionsnummer for forekomsten. Feltet ajourf=C3=B8res af Hiber= nate, som samtidig bruger det til at > * forhindre samtidig opdatering fra to processer. > * hibernate.version > * @return > */ > public long getVersion() { > return version; > } > public void setVersion(long version) { > this.version =3D version; > } > /** > * Udlever datotid (Dato og tidspunkt for sagsadvarsel). > * > * @hibernate.property not-null=3D"false" > * @return datotid > */ > public Date getDatoTid() { > return datoTid; > } > public void setDatoTid(Date datoTid) { > this.datoTid =3D datoTid; > } > /** > * Udlever Matrikelbetegnelse. > * > * @hibernate.component > */ > public Matrikelbetegnelse getMatrikelbetegnelse() { > return matrikelbetegnelse; > } > public void setMatrikelbetegnelse(Matrikelbetegnelse matrikelbetegnelse) = { > this.matrikelbetegnelse =3D matrikelbetegnelse; > } > } > import java.io.Serializable; > /** > */ > public class Matrikelbetegnelse { > private Long ejerlavskode ; > private String matrikelnr ; > public Matrikelbetegnelse() { > } > public Matrikelbetegnelse(Long ejerlavskode, String matrikelnummer) { > this.ejerlavskode =3D ejerlavskode; > this.matrikelnr =3D matrikelnummer; > } > /** > * > * @return > * @hibernate.property > */ > public Long getEjerlavskode() { > return ejerlavskode; > } > public void setEjerlavskode(Long ejerlavskode) { > this.ejerlavskode =3D ejerlavskode; > } > /** > * > * @return > * @hibernate.property length=3D"20" > */ > public String getMatrikelnr() { > return matrikelnr; > } > public void setMatrikelnr(String matrikelnr) { > this.matrikelnr =3D matrikelnr; > } > public boolean equals(Object o) { > if (this =3D=3D o) return true; > if (!(o instanceof Matrikelbetegnelse)) return false; > final Matrikelbetegnelse matrikelbetegnelse =3D (Matrikelbetegnelse) o; > if (!ejerlavskode.equals(matrikelbetegnelse.ejerlavskode)) return false; > if (!matrikelnr.equals(matrikelbetegnelse.matrikelnr)) return false; > return true; > } > public int hashCode() { > int result; > result =3D ejerlavskode.hashCode(); > result =3D 29 * result + matrikelnr.hashCode(); > return result; > } > } > Full stack trace of any exception that occurs: > No exception, just an empty result. > Name and version of the database you are using: > Oracle 10g Enteprise Edition release 10.1.0.2.0 > The generated SQL (show_sql=3Dtrue): > Hibernate: select this_.id as id34_0_, this_.datoTid as datoTid34_0_, thi= s_.ejerlavskode as ejerlavs3_34_0_, this_.matrikelnr as matrikelnr34_0_, th= is_.fk_sag_id as fk5_34_0_, this_.brugerId as brugerId34_0_, this_.tidsstem= pel as tidsstem7_34_0_, this_.gyldig_fra as gyldig8_34_0_, this_.gyldig_til= as gyldig9_34_0_, this_.oprind_id as oprind10_34_0_ from tan.sagsadvarsel = this_ where (this_.ejerlavskode, this_.matrikelnr) in ((?, ?), (?, ?)) > Debug level Hibernate log excerpt: > 14:02:58,631 DEBUG [CID=3D ] [org.hibernate.jdbc.AbstractBatcher.log(Abst= ractBatcher.java:346)] select this_.id as id34_1_, this_.version as version= 34_1_, this_.datoTid as datoTid34_1_, this_.ejerlavskode as ejerlavs4_34_1_= , this_.matrikelnr as matrikelnr34_1_, this_.fk_sag_id as fk6_34_1_, this_.= brugerId as brugerId34_1_, this_.tidsstempel as tidsstem8_34_1_, this_.gyld= ig_fra as gyldig9_34_1_, this_.gyldig_til as gyldig10_34_1_, this_.oprind_i= d as oprind11_34_1_, s1_.id as id15_0_, s1_.version as version15_0_, s1_.sa= gsId as sagsId15_0_, s1_.symbolskNavn as symbolsk4_15_0_, s1_.kms_journalnu= mmer as kms5_15_0_, s1_.journaliseringsDato as journali6_15_0_, s1_.rekvire= ntRef as rekviren7_15_0_, s1_.enum_sagskategori as enum8_15_0_, s1_.enum_pr= ioritet as enum9_15_0_, s1_.tidsfrist as tidsfrist15_0_, s1_.saerligAftale = as saerlig11_15_0_, s1_.matrikelnr as matrikelnr15_0_, s1_.ejerlavskode as = ejerlav13_15_0_, s1_.afventAntalHoeringssvar as afventA14_15_0_, s1_.afvent= AntalSupplDok as afventA15_15_0_, s1_.maaIkkeSlettes as maaIkke16_15_0_, s1= _.erForaeldet as erForae17_15_0_, s1_.brugerId as brugerId15_0_, s1_.tidsst= empel as tidsste19_15_0_, s1_.gyldig_fra as gyldig20_15_0_, s1_.gyldig_til = as gyldig21_15_0_, s1_.oprind_id as oprind22_15_0_, s1_.fk_aktoer_indsender= _id as fk23_15_0_, s1_.fk_aktoer_rekvirent_id as fk24_15_0_, s1_.fk_aktoer_= revisor_id as fk25_15_0_, s1_.fk_sagsbehandlerteam_id as fk26_15_0_, s1_.fk= _sagspakke_id as fk27_15_0_, s1_.fk_sagsresume_id as fk28_15_0_, s1_.aflysn= ingsmeddelelse as aflysni29_15_0_, s1_.fk_samlesag_id as fk30_15_0_ from ta= n.sagsadvarsel this_ inner join tan.sag s1_ on this_.fk_sag_id=3Ds1_.id whe= re (this_.ejerlavskode, this_.matrikelnr) in ((?, ?), (?, ?)) and not s1_.s= agsId=3D? order by this_.fk_sag_id asc, this_.ejerlavskode asc, this_.matri= kelnr asc > Hibernate: select this_.id as id34_1_, this_.version as version34_1_, thi= s_.datoTid as datoTid34_1_, this_.ejerlavskode as ejerlavs4_34_1_, this_.ma= trikelnr as matrikelnr34_1_, this_.fk_sag_id as fk6_34_1_, this_.brugerId a= s brugerId34_1_, this_.tidsstempel as tidsstem8_34_1_, this_.gyldig_fra as = gyldig9_34_1_, this_.gyldig_til as gyldig10_34_1_, this_.oprind_id as oprin= d11_34_1_, s1_.id as id15_0_, s1_.version as version15_0_, s1_.sagsId as sa= gsId15_0_, s1_.symbolskNavn as symbolsk4_15_0_, s1_.kms_journalnummer as km= s5_15_0_, s1_.journaliseringsDato as journali6_15_0_, s1_.rekvirentRef as r= ekviren7_15_0_, s1_.enum_sagskategori as enum8_15_0_, s1_.enum_prioritet as= enum9_15_0_, s1_.tidsfrist as tidsfrist15_0_, s1_.saerligAftale as saerlig= 11_15_0_, s1_.matrikelnr as matrikelnr15_0_, s1_.ejerlavskode as ejerlav13_= 15_0_, s1_.afventAntalHoeringssvar as afventA14_15_0_, s1_.afventAntalSuppl= Dok as afventA15_15_0_, s1_.maaIkkeSlettes as maaIkke16_15_0_, s1_.erForael= det as erForae17_15_0_, s1_.brugerId as brugerId15_0_, s1_.tidsstempel as t= idsste19_15_0_, s1_.gyldig_fra as gyldig20_15_0_, s1_.gyldig_til as gyldig2= 1_15_0_, s1_.oprind_id as oprind22_15_0_, s1_.fk_aktoer_indsender_id as fk2= 3_15_0_, s1_.fk_aktoer_rekvirent_id as fk24_15_0_, s1_.fk_aktoer_revisor_id= as fk25_15_0_, s1_.fk_sagsbehandlerteam_id as fk26_15_0_, s1_.fk_sagspakke= _id as fk27_15_0_, s1_.fk_sagsresume_id as fk28_15_0_, s1_.aflysningsmeddel= else as aflysni29_15_0_, s1_.fk_samlesag_id as fk30_15_0_ from tan.sagsadva= rsel this_ inner join tan.sag s1_ on this_.fk_sag_id=3Ds1_.id where (this_.= ejerlavskode, this_.matrikelnr) in ((?, ?), (?, ?)) and not s1_.sagsId=3D? = order by this_.fk_sag_id asc, this_.ejerlavskode asc, this_.matrikelnr asc > 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.jdbc.AbstractBatcher.getPrepa= redStatement(AbstractBatcher.java:424)] preparing statement > 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet= (NullableType.java:79)] binding '9999' to parameter: 1 > 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet= (NullableType.java:79)] binding '9999' to parameter: 2 > 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet= (NullableType.java:79)] binding '01' to parameter: 3 > 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet= (NullableType.java:79)] binding '03' to parameter: 4 > 14:02:58,701 DEBUG [CID=3D ] [org.hibernate.jdbc.AbstractBatcher.logOpenR= esults(AbstractBatcher.java:327)] about to open ResultSet (open ResultSets:= 0, globally: 0) --=20 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= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Thomas A. (JIRA) <no...@at...> - 2006-06-12 13:02:37
|
Expression.in on component object gives parameters til SQL in wrong order. -------------------------------------------------------------------------- Key: HHH-1832 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH= -1832 Project: Hibernate3 Type: Bug Components: query-criteria =20 Versions: 3.1.2 =20 Environment: Development in IntellIJ IDEA 4.5.3 Database:Oracle 10g Enteprise Edition release 10.1.0.2.0=20 Reporter: Thomas Andersen I'm using an Expression.in on a component class with two attributes (one Lo= ng and one String). When executing the code I an empty list. When using the generated SQL in DBVisualizer adding the variables it return= s the expectet list. Debug log level and reveals (detailed documentation later in description): Parameters are bound in the wrong order: Paramters are bound ... where (this_.ejerlavskode, this_.matrikelnr) in ((9999, 9999), (01, 03)= ) should be 9999, 01, 9999, 03 according to=20 ... where (this_.ejerlavskode, this_.matrikelnr) in ((9999, 01), (9999, 03)= ) Parameter pairs are by class Matrikelbetegnelse(ejerlavskode=3D9999, matrik= enr=3D01) Hibernate version: Hibernate 3.1.2 Mapping documents: <?xml version=3D"1.0" encoding=3D"UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping <class name=3D"Sagsadvarsel" table=3D"sagsadvarsel" > <id name=3D"id" column=3D"id" type=3D"long" > <generator class=3D"native"> <param name=3D"sequence">sagsadvarsel_id_seq</param> </generator> </id> <version name=3D"version" column=3D"version" type=3D"long" /> <property name=3D"datoTid" type=3D"java.util.Date" update=3D"true" insert=3D"true" column=3D"datoTid" not-null=3D"false" /> <component name=3D"matrikelbetegnelse" class=3D"Matrikelbetegnelse" > <property name=3D"ejerlavskode" type=3D"java.lang.Long" update=3D"true" insert=3D"true" column=3D"ejerlavskode" /> <property name=3D"matrikelnr" type=3D"java.lang.String" update=3D"true" insert=3D"true" column=3D"matrikelnr" length=3D"20" /> </component> </class> </hibernate-mapping> Code between sessionFactory.openSession() and session.close(): Long ejerlav =3D new Long(9999); final Matrikelbetegnelse[] matrikelbetegnelser =3D new Matrikelbetegnelse[2= ]; matrikelbetegnelser[0] =3D new Matrikelbetegnelse(ejerlav, "01"); matrikelbetegnelser[1] =3D new Matrikelbetegnelse(ejerlav, "03"); List list =3D session.createCriteria(Sagsadvarsel.class) .add(Expression.in("matrikelbetegnelse",matrikelbetegnelser)) .list(); log.debug("list " + list.size()); import java.util.Date; import java.io.Serializable; /** * @hibernate.class table=3D"sagsadvarsel" */ public class Sagsadvarsel implements Serializable{ private long id; private long version; private Date datoTid; private Matrikelbetegnelse matrikelbetegnelse; /** * @return * @hibernate.id generator-class=3D"native" */ public long getId() { return id; } public void setId(long id) { this.id =3D id; } /** * Udlever versionsnummer for forekomsten. Feltet ajourf=C3=B8res af Hiberna= te, som samtidig bruger det til at * forhindre samtidig opdatering fra to processer. * hibernate.version * @return */ public long getVersion() { return version; } public void setVersion(long version) { this.version =3D version; } /** * Udlever datotid (Dato og tidspunkt for sagsadvarsel). * * @hibernate.property not-null=3D"false" * @return datotid */ public Date getDatoTid() { return datoTid; } public void setDatoTid(Date datoTid) { this.datoTid =3D datoTid; } /** * Udlever Matrikelbetegnelse. * * @hibernate.component */ public Matrikelbetegnelse getMatrikelbetegnelse() { return matrikelbetegnelse; } public void setMatrikelbetegnelse(Matrikelbetegnelse matrikelbetegnelse) { this.matrikelbetegnelse =3D matrikelbetegnelse; } } import java.io.Serializable; /** */ public class Matrikelbetegnelse { private Long ejerlavskode ; private String matrikelnr ; public Matrikelbetegnelse() { } public Matrikelbetegnelse(Long ejerlavskode, String matrikelnummer) { this.ejerlavskode =3D ejerlavskode; this.matrikelnr =3D matrikelnummer; } /** * * @return * @hibernate.property */ public Long getEjerlavskode() { return ejerlavskode; } public void setEjerlavskode(Long ejerlavskode) { this.ejerlavskode =3D ejerlavskode; } /** * * @return * @hibernate.property length=3D"20" */ public String getMatrikelnr() { return matrikelnr; } public void setMatrikelnr(String matrikelnr) { this.matrikelnr =3D matrikelnr; } public boolean equals(Object o) { if (this =3D=3D o) return true; if (!(o instanceof Matrikelbetegnelse)) return false; final Matrikelbetegnelse matrikelbetegnelse =3D (Matrikelbetegnelse) o; if (!ejerlavskode.equals(matrikelbetegnelse.ejerlavskode)) return false; if (!matrikelnr.equals(matrikelbetegnelse.matrikelnr)) return false; return true; } public int hashCode() { int result; result =3D ejerlavskode.hashCode(); result =3D 29 * result + matrikelnr.hashCode(); return result; } } Full stack trace of any exception that occurs: No exception, just an empty result. Name and version of the database you are using: Oracle 10g Enteprise Edition release 10.1.0.2.0 The generated SQL (show_sql=3Dtrue): Hibernate: select this_.id as id34_0_, this_.datoTid as datoTid34_0_, this_= .ejerlavskode as ejerlavs3_34_0_, this_.matrikelnr as matrikelnr34_0_, this= _.fk_sag_id as fk5_34_0_, this_.brugerId as brugerId34_0_, this_.tidsstempe= l as tidsstem7_34_0_, this_.gyldig_fra as gyldig8_34_0_, this_.gyldig_til a= s gyldig9_34_0_, this_.oprind_id as oprind10_34_0_ from tan.sagsadvarsel th= is_ where (this_.ejerlavskode, this_.matrikelnr) in ((?, ?), (?, ?)) Debug level Hibernate log excerpt: 14:02:58,631 DEBUG [CID=3D ] [org.hibernate.jdbc.AbstractBatcher.log(Abstra= ctBatcher.java:346)] select this_.id as id34_1_, this_.version as version34= _1_, this_.datoTid as datoTid34_1_, this_.ejerlavskode as ejerlavs4_34_1_, = this_.matrikelnr as matrikelnr34_1_, this_.fk_sag_id as fk6_34_1_, this_.br= ugerId as brugerId34_1_, this_.tidsstempel as tidsstem8_34_1_, this_.gyldig= _fra as gyldig9_34_1_, this_.gyldig_til as gyldig10_34_1_, this_.oprind_id = as oprind11_34_1_, s1_.id as id15_0_, s1_.version as version15_0_, s1_.sags= Id as sagsId15_0_, s1_.symbolskNavn as symbolsk4_15_0_, s1_.kms_journalnumm= er as kms5_15_0_, s1_.journaliseringsDato as journali6_15_0_, s1_.rekvirent= Ref as rekviren7_15_0_, s1_.enum_sagskategori as enum8_15_0_, s1_.enum_prio= ritet as enum9_15_0_, s1_.tidsfrist as tidsfrist15_0_, s1_.saerligAftale as= saerlig11_15_0_, s1_.matrikelnr as matrikelnr15_0_, s1_.ejerlavskode as ej= erlav13_15_0_, s1_.afventAntalHoeringssvar as afventA14_15_0_, s1_.afventAn= talSupplDok as afventA15_15_0_, s1_.maaIkkeSlettes as maaIkke16_15_0_, s1_.= erForaeldet as erForae17_15_0_, s1_.brugerId as brugerId15_0_, s1_.tidsstem= pel as tidsste19_15_0_, s1_.gyldig_fra as gyldig20_15_0_, s1_.gyldig_til as= gyldig21_15_0_, s1_.oprind_id as oprind22_15_0_, s1_.fk_aktoer_indsender_i= d as fk23_15_0_, s1_.fk_aktoer_rekvirent_id as fk24_15_0_, s1_.fk_aktoer_re= visor_id as fk25_15_0_, s1_.fk_sagsbehandlerteam_id as fk26_15_0_, s1_.fk_s= agspakke_id as fk27_15_0_, s1_.fk_sagsresume_id as fk28_15_0_, s1_.aflysnin= gsmeddelelse as aflysni29_15_0_, s1_.fk_samlesag_id as fk30_15_0_ from tan.= sagsadvarsel this_ inner join tan.sag s1_ on this_.fk_sag_id=3Ds1_.id where= (this_.ejerlavskode, this_.matrikelnr) in ((?, ?), (?, ?)) and not s1_.sag= sId=3D? order by this_.fk_sag_id asc, this_.ejerlavskode asc, this_.matrike= lnr asc Hibernate: select this_.id as id34_1_, this_.version as version34_1_, this_= .datoTid as datoTid34_1_, this_.ejerlavskode as ejerlavs4_34_1_, this_.matr= ikelnr as matrikelnr34_1_, this_.fk_sag_id as fk6_34_1_, this_.brugerId as = brugerId34_1_, this_.tidsstempel as tidsstem8_34_1_, this_.gyldig_fra as gy= ldig9_34_1_, this_.gyldig_til as gyldig10_34_1_, this_.oprind_id as oprind1= 1_34_1_, s1_.id as id15_0_, s1_.version as version15_0_, s1_.sagsId as sags= Id15_0_, s1_.symbolskNavn as symbolsk4_15_0_, s1_.kms_journalnummer as kms5= _15_0_, s1_.journaliseringsDato as journali6_15_0_, s1_.rekvirentRef as rek= viren7_15_0_, s1_.enum_sagskategori as enum8_15_0_, s1_.enum_prioritet as e= num9_15_0_, s1_.tidsfrist as tidsfrist15_0_, s1_.saerligAftale as saerlig11= _15_0_, s1_.matrikelnr as matrikelnr15_0_, s1_.ejerlavskode as ejerlav13_15= _0_, s1_.afventAntalHoeringssvar as afventA14_15_0_, s1_.afventAntalSupplDo= k as afventA15_15_0_, s1_.maaIkkeSlettes as maaIkke16_15_0_, s1_.erForaelde= t as erForae17_15_0_, s1_.brugerId as brugerId15_0_, s1_.tidsstempel as tid= sste19_15_0_, s1_.gyldig_fra as gyldig20_15_0_, s1_.gyldig_til as gyldig21_= 15_0_, s1_.oprind_id as oprind22_15_0_, s1_.fk_aktoer_indsender_id as fk23_= 15_0_, s1_.fk_aktoer_rekvirent_id as fk24_15_0_, s1_.fk_aktoer_revisor_id a= s fk25_15_0_, s1_.fk_sagsbehandlerteam_id as fk26_15_0_, s1_.fk_sagspakke_i= d as fk27_15_0_, s1_.fk_sagsresume_id as fk28_15_0_, s1_.aflysningsmeddelel= se as aflysni29_15_0_, s1_.fk_samlesag_id as fk30_15_0_ from tan.sagsadvars= el this_ inner join tan.sag s1_ on this_.fk_sag_id=3Ds1_.id where (this_.ej= erlavskode, this_.matrikelnr) in ((?, ?), (?, ?)) and not s1_.sagsId=3D? or= der by this_.fk_sag_id asc, this_.ejerlavskode asc, this_.matrikelnr asc 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.jdbc.AbstractBatcher.getPrepare= dStatement(AbstractBatcher.java:424)] preparing statement 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet(N= ullableType.java:79)] binding '9999' to parameter: 1 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet(N= ullableType.java:79)] binding '9999' to parameter: 2 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet(N= ullableType.java:79)] binding '01' to parameter: 3 14:02:58,641 DEBUG [CID=3D ] [org.hibernate.type.NullableType.nullSafeSet(N= ullableType.java:79)] binding '03' to parameter: 4 14:02:58,701 DEBUG [CID=3D ] [org.hibernate.jdbc.AbstractBatcher.logOpenRes= ults(AbstractBatcher.java:327)] about to open ResultSet (open ResultSets: 0= , globally: 0) --=20 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= .jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Pavel D. (JIRA) <no...@at...> - 2006-06-12 08:54:40
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HB-177?page=comments#action_23320 ] Pavel Denisov commented on HB-177: ---------------------------------- I am having the same problem at the moment. I do not see how returning a boolean as a result of a summary of a boolean field would give any valuable information. What I usually want to do is to get a sum of all the false values or true values and return them as an integer. To me there is no other way to aggregate a boolean field. > (Includes Fix) Return type of aggregate function, sum, when applied over booleans should be an integer, giving the number of true values > ---------------------------------------------------------------------------------------------------------------------------------------- > > Key: HB-177 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-177 > Project: Hibernate2 > Type: New Feature > Components: core > Versions: 2.1, 2.0 final, 2.0.2, 2.0.1 > Environment: MySql > Reporter: Hugh Leather > Priority: Minor > > > When doing a select which aggregates a sum of booleans, the result is also a boolean. I think this is no so useful and would prefer the number of true values. This is what seems to be returned from the underlying sql, but the information is destroyed by casting to a boolean. > The fix I have for this issue is a few small chnges to SelectParser.java. Here is the new file, with my additions marked by comments along the lines of // Begin change ... > If anyone things this is worth adding and intends to do so, could you email me aat hug...@ho... and let me know. > Thanks, > Hugh. > //$Id: SelectParser.java,v 1.12 2003/05/07 15:09:05 oneovthafew Exp $ > package net.sf.hibernate.hql; > import java.sql.Types; > import java.util.HashSet; > import java.util.Set; > import net.sf.hibernate.AssertionFailure; > import net.sf.hibernate.Hibernate; > import net.sf.hibernate.MappingException; > import net.sf.hibernate.QueryException; > // Begin change : Hugh Leather 10.07.2003 (See comment at top of file) > import net.sf.hibernate.type.BooleanType; > // End change : Hugh Leather 10.07.2003 (See comment at top of file) > import net.sf.hibernate.type.Type; > import net.sf.hibernate.util.StringHelper; > /** > * Parsers the select clause of a hibernate query, looking > * for a table (well, really class) alias. > */ > // Change : Hugh Leather 10.07.2003 > // Several small changes are introduced to ensure that the return type of the > // sum aggregate function over booleans gives an integer result. > public class SelectParser implements Parser { > > private static final Set aggregateFunctions = new HashSet(); > private static final Set countArguments = new HashSet(); > static { > aggregateFunctions.add("count"); > aggregateFunctions.add("avg"); > aggregateFunctions.add("max"); > aggregateFunctions.add("min"); > aggregateFunctions.add("sum"); > > countArguments.add("distinct"); > countArguments.add("all"); > countArguments.add("*"); > } > > private boolean ready; > private boolean aggregate; > private boolean count; > private boolean avg; > // Begin change : Hugh Leather 10.07.2003 (See comment at top of file) > private boolean sum; > // End change : Hugh Leather 10.07.2003 (See comment at top of file) > private boolean first; > private boolean afterNew; > private Class holderClass; > > private SelectPathExpressionParser pathExpressionParser = new SelectPathExpressionParser(); > private PathExpressionParser aggregatePathExpressionParser = new PathExpressionParser(); > > public void token(String token, QueryTranslator q) throws QueryException { > > String lctoken = token.toLowerCase(); > > if (first) { > first = false; > if ( lctoken.equals("distinct") ) { > q.setDistinct(true); > return; > } > else if ( lctoken.equals("all") ) { > q.setDistinct(false); > return; > } > } > > if (afterNew) { > afterNew=false; > holderClass = q.getImportedClass(token); > if (holderClass==null) throw new QueryException("class not found: " + token); > q.setHolderClass(holderClass); > } > else if ( token.equals(StringHelper.COMMA) ) { > if (ready) throw new QueryException("alias or expression expected in SELECT"); > q.appendScalarSelectToken(StringHelper.COMMA_SPACE); > ready=true; > } > else if ( "new".equals(lctoken) ) { > afterNew=true; > ready=false; > } > else if ( StringHelper.OPEN_PAREN.equals(token) ) { > if (!aggregate && holderClass!=null && !ready) { > //opening paren in new Foo ( ... ) > ready=true; > } > else if (aggregate) { > q.appendScalarSelectToken(token); > } > else { > throw new QueryException("aggregate function expected before ( in SELECT"); > } > ready = true; > } > else if ( StringHelper.CLOSE_PAREN.equals(token) ) { > if (holderClass!=null && !ready) { > //closing paren in new Foo ( ... ) > } > else if (aggregate && ready) { > q.appendScalarSelectToken(token); > } > else { > throw new QueryException("( expected before ) in select"); > } > count=false; > aggregate = false; > ready = false; > } > else if ( countArguments.contains(lctoken) ) { > if ( !ready || !aggregate ) throw new QueryException( token + " only allowed inside aggregate function in SELECT"); > q.appendScalarSelectToken(token); > } > else if ( aggregateFunctions.contains(lctoken) ) { > if (!ready) throw new QueryException(", expected before aggregate function in SELECT: " + token); > if ( lctoken.equals("count") ) { > q.addSelectScalar(Hibernate.INTEGER); //must be handled differently 'cos of count(*) > count = true; > } > else if ( lctoken.equals("avg") ) { > avg = true; > } > // Begin change : Hugh Leather 10.07.2003 (See comment at top of file) > else if( lctoken.equals("sum") ) { > sum = true; > } > // End change : Hugh Leather 10.07.2003 (See comment at top of file) > aggregate = true; > ready = false; > q.appendScalarSelectToken(token); > } > else if (aggregate) { > if (!ready) throw new QueryException("( expected after aggregate function in SELECT"); > ParserHelper.parse(aggregatePathExpressionParser, q.unalias(token), ParserHelper.PATH_SEPARATORS, q); > > if ( aggregatePathExpressionParser.isCollectionValued() ) { > q.addCollection( > aggregatePathExpressionParser.getCollectionName(), > aggregatePathExpressionParser.getCollectionRole() > ); > } > q.appendScalarSelectToken( aggregatePathExpressionParser.getWhereColumn() ); > if (!count) q.addSelectScalar( aggregateType( aggregatePathExpressionParser.getWhereColumnType(), q ) ); > aggregatePathExpressionParser.addAssociation(q); > } > else { > if (!ready) throw new QueryException(", expected in SELECT"); > ParserHelper.parse(pathExpressionParser, q.unalias(token), ParserHelper.PATH_SEPARATORS, q); > if ( pathExpressionParser.isCollectionValued() ) { > q.addCollection( > pathExpressionParser.getCollectionName(), > pathExpressionParser.getCollectionRole() > ); > } > else if ( pathExpressionParser.getWhereColumnType().isEntityType() ) { > q.addSelectClass( pathExpressionParser.getSelectName() ); > } > q.appendScalarSelectTokens( pathExpressionParser.getWhereColumns() ); > q.addSelectScalar( pathExpressionParser.getWhereColumnType() ); > pathExpressionParser.addAssociation(q); > > ready = false; > } > } > > public Type aggregateType(Type type, QueryTranslator q) throws QueryException { > if (count) { > throw new AssertionFailure("count(*) must be handled differently"); > } > else if (avg) { > int[] sqlTypes; > try { > sqlTypes = type.sqlTypes(q.factory); > } > catch (MappingException me) { > throw new QueryException(me); > } > if (sqlTypes.length!=1) throw new QueryException("multi-column type in avg()"); > int sqlType = sqlTypes[0]; > if ( sqlType==Types.INTEGER || sqlType==Types.BIGINT || sqlType==Types.TINYINT ) { > return Hibernate.FLOAT; > } > else { > return type; > } > > } > // Begin change : Hugh Leather 10.07.2003 (See comment at top of file) > else if (sum) { > if (type instanceof BooleanType) { > return Hibernate.INTEGER; > } > else { > return type; > } > } > // End change : Hugh Leather 10.07.2003 (See comment at top of file) > else { > return type; > } > } > > public void start(QueryTranslator q) { > ready=true; > first=true; > aggregate=false; > count = false; > avg = false; > afterNew = false; > holderClass = null; > } > > public void end(QueryTranslator q) { > } > > } -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-06-12 06:12:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-349?page=comments#action_23318 ] Christian Bauer commented on ANN-349: ------------------------------------- Glassfish team prefers FlushModeType.MANUAL. > Add @FlushModeType.APPLICATION > ------------------------------ > > Key: ANN-349 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-349 > Project: Hibernate Annotations > Type: New Feature > Reporter: Christian Bauer > Priority: Blocker > > > Add @FlushMode(FlushModeType.APPLICATION) and synchronize this name with the Glassfish team. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Christian B. (JIRA) <no...@at...> - 2006-06-12 06:12:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-184?page=comments#action_23319 ] Christian Bauer commented on EJB-184: ------------------------------------- Glassfish team prefers FlushModeType.MANUAL. > Add EM property for FlushModeType.APPLICATION > --------------------------------------------- > > Key: EJB-184 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-184 > Project: Hibernate Entity Manager > Type: New Feature > Components: EntityManager > Reporter: Christian Bauer > Priority: Blocker > > > Add a "flushmode.application" property for createEntityManager() and sync this name with the Glassfish team. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: amit b. (JIRA) <no...@at...> - 2006-06-12 05:32:34
|
Batch loading the same EntityKey (one side of manytoone ) more than once ------------------------------------------------------------------------ Key: HHH-1831 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1831 Project: Hibernate3 Type: Improvement Components: core Versions: 3.1.1, 3.1.2, 3.1.3 Reporter: amit bhayani Priority: Minor Within the same session, the same entity gets batch loaded multiple times. The ManyToOneType.scheduleBatchLoad calls BatchFetchQueue.addBatchLoadableEntityKey without checking to see if the entity already exists with the current PersistanceContext. Adding the extra condition "!context.containsEntity(key)" to the BatchFetchQueue.addBatchLoadableEntityKey method which seems to address the issue. public void addBatchLoadableEntityKey(EntityKey key) { if ( key.isBatchLoadable() && !context.containsEntity(key) ) { batchLoadableEntityKeys.put(key, MARKER); } } This will save few loops if we have large set of Entity being lodaded with each of them having manytoone relationship with other Entity. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Vincent N. (JIRA) <no...@at...> - 2006-06-12 04:11:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1661?page=comments#action_23317 ] Vincent Ngan commented on HHH-1661: ----------------------------------- Can anyone tell me why this is the expected behavior? I think it breaks optimistic concurrency protection. If the merge() method is able to detect an optimistic concurrency problem when a detached object has been updated by another transaction, it should also behave the same way if the object has been deleted by another transaction. Otherwise, the whole optimistic concurrency concept is broken. It is fine for the merge method to behave in this way if the object is not enabled with optimistic concurrency versioning, but if optimistic concurrency is enabled, it is definitely a bug or a design flaw in the merge method. > merge of a deleted object results in a insert? > ---------------------------------------------- > > Key: HHH-1661 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1661 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.1.3 > Environment: Hibernate 3.1.3, SQL Server > Reporter: Tu-Thach > > > A persistent object is loaded from a session and deleted, then close the session. Using that same object in another session and call merge results in the object being inserted into the database. Here's the sample code: > Session session = factory.getCurrentSession(); > session.beginTransaction(); > MyClass obj = (MyClass)session.load(MyClass.class, new Integer(10)); > session.delete(obj); > session.getTransaction().commit(); > session = factory.getCurrentSession(); > session.beginTransaction(); > session.merge(obj); > session.getTransaction().commit(); > Since the object is already deleted, merge could not find it and thus proceeds with a INSERT. Shouldn't it throw an exception instead? -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Den R. (JIRA) <no...@at...> - 2006-06-11 21:25:33
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HB-281?page=comments#action_23316 ] Den Raskovalov commented on HB-281: ----------------------------------- I solved my problem with Criteria API, which always produces full joins > ".class" with <joined-subclass> problem > --------------------------------------- > > Key: HB-281 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-281 > Project: Hibernate2 > Type: Bug > Components: core > Environment: windows 2000 > Reporter: Simone Ricciardi > Priority: Minor > > > I've acknowledged an error that happens using "select count (*) ..." > together to a where clause "... where alias.class = ClassName ". > Suppose to have two classes: > public class Foo > { > String id; > String attr1; > public String getId(){ return id; } > public void setId(String id){ this.id = id; } > public String getAttr1(){ return attr1; } > public void setAttr1(String attr1){ this.attr1 = attr1; } > } > public class Bar extends Foo > { > String attr2; > public String getAttr2(){ return attr2; } > public void setAttr2(String attr2){ this.attr2 = attr2; } > } > and the corresponding mapping file: > <hibernate-mapping> > <class name="test.persistents.Foo" table="Foo"> > <id name="id" type="string"> > <column name="id" length="32"/> > <generator class="uuid.hex"/> > </id> > <property name="attr1" column="attr1" type="string"/> > <joined-subclass name="test.persistents.Bar" table="Bar"> > <key column="foo_id"/> > <property name="attr2" column="attr2" type="string"/> > </joined-subclass> > </class> > </hibernate-mapping> > When I try to make the following query: > Query query = session.createQuery("select count(*) from Foo foo where foo.class = Foo"); > I get an error of this type: > java.sql.SQLException: General error, message from server: "Unknown table 'foo0__1' in where clause" > at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1651) > at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:889) > at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:956) > at com.mysql.jdbc.Connection.execSQL(Connection.java:1874) > at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1538) > at com.p6spy.engine.logging.P6LogPreparedStatement.executeQuery(P6LogPreparedStatement.java:171) > at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:71) > at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:551) > at net.sf.hibernate.loader.Loader.doFind(Loader.java:140) > at net.sf.hibernate.loader.Loader.find(Loader.java:620) > at net.sf.hibernate.hql.QueryTranslator.find(QueryTranslator.java:928) > at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1343) > at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:76) > at test.Test.main(Test.java:42) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > while if I perform the same query without the select count(*) (select foo from Foo foo where foo.class = Foo) > all works fine. > Comparing the two queries produced by hibernate in both cases, > it seems that the error derives from the lack of the "left outer join" with the Bar table in the "from" clause: > with select count(*): > select count(*) as x0_0_ > from Foo foo0_ > where (case when foo0__1.foo_id is not null then 1 when foo0_.id is not null then 0 end=0 ) > without select count(*): > select foo0_.id as id, > case when foo0__1.foo_id is not null then 1 > when foo0_.id is not null then 0 end > as clazz_, > foo0_.attr1 as attr10_, > foo0__1.attr2 as attr21_ > from Foo foo0_ left outer join Bar foo0__1 on foo0_.id=foo0__1.foo_id > where (case when foo0__1.foo_id is not null then 1 when foo0_.id is not null then 0 end=0 ) > in fact the query should be the following: > select count(*) as x0_0_ > from Foo foo0_ left outer join Bar foo0__1 on foo0_.id=foo0__1.foo_id > where (case when foo0__1.foo_id is not null then 1 when foo0_.id is not null then 0 end=0 ) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Den R. (JIRA) <no...@at...> - 2006-06-11 21:21:33
|
Error during parse query on MS SQL ---------------------------------- Key: HHH-1830 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1830 Project: Hibernate3 Type: Bug Versions: 3.1.2, 3.2.0.cr2 Environment: Microsoft SQL Server 2000, Windows XP, JDK 1.5 Update 4 Reporter: Den Raskovalov Priority: Critical HQL: select deal, items.dateBegin, client.Title from " + CoreDeal.class.getName() + " deal left join deal.stagesWorkflowInstance.history.items items, " + CoreClient.class.getName() + " client where stageResponsible=:stageResponsible and items.index=maxindex(items) and deal.parent=client and deal.stagesWorkflowInstance.Stage.showOnPersonalPage=1 It works normally on Oracle, but on MS SQL produces: Error: String index out of range: -5 [java.lang.StringIndexOutOfBoundsException] java.lang.String.substring(String.java:1768) java.lang.String.substring(String.java:1735) org.hibernate.hql.CollectionSubqueryFactory.createCollectionSubquery(CollectionSubqueryFactory.java:32) org.hibernate.hql.ast.tree.FromElementType.toColumns(FromElementType.java:301) org.hibernate.hql.ast.tree.FromElementType.toColumns(FromElementType.java:291) org.hibernate.hql.ast.tree.FromElement.toColumns(FromElement.java:377) org.hibernate.hql.ast.tree.MethodNode.resolveCollectionProperty(MethodNode.java:115) org.hibernate.hql.ast.tree.MethodNode.collectionProperty(MethodNode.java:95) org.hibernate.hql.ast.tree.MethodNode.resolve(MethodNode.java:44) org.hibernate.hql.ast.HqlSqlWalker.processFunction(HqlSqlWalker.java:844) org.hibernate.hql.antlr.HqlSqlBaseWalker.functionCall(HqlSqlBaseWalker.java:2324) org.hibernate.hql.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1285) org.hibernate.hql.antlr.HqlSqlBaseWalker.exprOrSubquery(HqlSqlBaseWalker.java:4032) org.hibernate.hql.antlr.HqlSqlBaseWalker.comparisonExpr(HqlSqlBaseWalker.java:3521) org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1758) org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1686) org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1683) org.hibernate.hql.antlr.HqlSqlBaseWalker.logicalExpr(HqlSqlBaseWalker.java:1683) org.hibernate.hql.antlr.HqlSqlBaseWalker.whereClause(HqlSqlBaseWalker.java:776) org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:577) org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281) org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229) org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:227) org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:159) org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:110) org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77) org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56) org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:71) org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1612) ru.naumen.crm2.bobjects.deal.CoreDealHibernateHandler.listAllDealsWithSortDataByResponsible(CoreDealHibernateHandler.java:109) ru.naumen.crm2.ui.tlc.CoreEmployeeTableListController.listMyDealsSorted(CoreEmployeeTableListController.java:70) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-06-11 19:31:36
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-635?page=comments#action_23315 ] Max Rydahl Andersen commented on HBX-635: ----------------------------------------- would require users to register drivers twice .... and it doesn't sound very userfriendly. (we should though try and hook into DTP/RDB driver registrations) > RCP Plugin > ----------- > > Key: HBX-635 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-635 > Project: Hibernate Tools > Type: New Feature > Components: eclipse > Environment: Eclipse > Reporter: Markus M. May > Priority: Minor > > > I am currently developing a RCP application using the Hibernate Plugins. Therefor I have had to extend the MANIFEST.MF so that hibernate could find my hibernate.cfg.xml. I would like to see an easier and much more user-friendly plugin for the development of RCP applications. This Plugin should just have all the needed dependencies and should allow to put the hibernate.cfg.xml into any other (new) plugin. Also the database libs should be found by the classloader of eclpse. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Gregory G. (JIRA) <no...@at...> - 2006-06-11 19:16:32
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-635?page=comments#action_23314 ] Gregory Gerard commented on HBX-635: ------------------------------------ What about creating one org.hibernate.jdbc plugin and then either let it define an extension point so JDBC drivers can register with it and be enumerated. Or JDBC driver fragments. I think this would preven Hibernate from having to know everything in advance. > RCP Plugin > ----------- > > Key: HBX-635 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-635 > Project: Hibernate Tools > Type: New Feature > Components: eclipse > Environment: Eclipse > Reporter: Markus M. May > Priority: Minor > > > I am currently developing a RCP application using the Hibernate Plugins. Therefor I have had to extend the MANIFEST.MF so that hibernate could find my hibernate.cfg.xml. I would like to see an easier and much more user-friendly plugin for the development of RCP applications. This Plugin should just have all the needed dependencies and should allow to put the hibernate.cfg.xml into any other (new) plugin. Also the database libs should be found by the classloader of eclpse. -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Gavin K. (JIRA) <no...@at...> - 2006-06-11 17:05:34
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1827?page=all ] Gavin King closed HHH-1827: --------------------------- Resolution: Fixed Assign To: Gavin King (was: Steve Ebersole) Fixed. Wooohooo, my first "svn ci"! > JTATransactionFactory.isTransactionInProgress() hides NamingException > --------------------------------------------------------------------- > > Key: HHH-1827 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1827 > Project: Hibernate3 > Type: Bug > Components: core > Reporter: Gavin King > Assignee: Gavin King > > > This code: > try { > ut = ( UserTransaction ) context.lookup( utName ); > } > catch ( NamingException e ) { > throw new TransactionException( "Unable to locate UserTransaction to check status" ); > } > Should be: > try { > ut = ( UserTransaction ) context.lookup( utName ); > } > catch ( NamingException e ) { > throw new TransactionException( "Unable to locate UserTransaction to check status" , e); > } -- 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.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |