Re: [Hibernate] New error on Annotation query

2006-06-19 Thread Max Andersen
Title: Re: [Hibernate] New error on Annotation query





>From my understanding in discussions with Max, 
auto-discovery is illegalonce any returns have been 
defined/added.Max, can you clarify here?  Thinking some more about 
it, maybe you justmeant the column name discovery (as it should be possible 
to stillauto-discover types in this scenario)?
Yes - autodiscover of scalar types should always be 
possible.
name discovery is only possible activated when nothing 
is added to the query.
Also, in general, we need to make certain that 
these types of"integration point tests" are defined within the Hibernate 
test suiteproper so that we can catch these discrepancies 
earlier...
I dont have a working setup here at the moment - but there 
definitly should be test for this part.
But maybe this specific case of mixed add's might be 
missed.
-max
 
-Original Message-From: 
[EMAIL PROTECTED][mailto:[EMAIL PROTECTED]] 
On Behalf OfEmmanuel BernardSent: Sunday, June 18, 2006 10:21 PMTo: 
Hibernate developmentSubject: [Hibernate] New error on Annotation 
queryHas something changed that I haven't propagated in my 
code?org.hibernate.HibernateException: cannot perform autodiscovery 
onqueries with non-scalar results    
atorg.hibernate.loader.custom.CustomLoader$NonScalarResultColumnProcessor.performDiscovery(CustomLoader.java:453)    
atorg.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.java:511)    
at 
org.hibernate.loader.Loader.getResultSet(Loader.java:1677)    
at org.hibernate.loader.Loader.doQuery(Loader.java:662)    
atorg.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)    
at org.hibernate.loader.Loader.doList(Loader.java:2144)    
atorg.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)    
at org.hibernate.loader.Loader.list(Loader.java:2023)    
atorg.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:290)    
atorg.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695)    
atorg.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)    
at 
org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:150)    
atorg.hibernate.test.annotations.query.QueryTest.testNativeQueryAndCompositePKAndComponents(QueryTest.java:195)    
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)    
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    
atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    
at 
org.hibernate.test.annotations.TestCase.runTest(TestCase.java:67)    
atcom.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:32)    
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native 
Method)    
atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    
atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    
atcom.intellij.rt.execution.application.AppMain.main(AppMain.java:90)@NamedNativeQuery(name 
= "compositekey",    query = "select 
name, model, speed, lname as lastn, fname asfirstn, length, width, length * 
width as surface, length * width *10 asvolume from 
SpaceShip",    resultSetMapping = 
"compositekey")    
}@SqlResultSetMapping(name = 
"compositekey",    entities = 
@EntityResult(entityClass 
=org.hibernate.test.annotations.query.SpaceShip.class,    
fields = 
{    
@FieldResult(name = "name", column = 
"name"),    
@FieldResult(name = "model", column = 
"model"),    
@FieldResult(name = "speed", column = 
"speed"),    
@FieldResult(name = "dimensions.width", column 
="width"),    
@FieldResult(name = "captain.lastname", column 
="lastn"),    
@FieldResult(name = "dimensions.length", column 
="length"),    
@FieldResult(name = "captain.firstname", column 
="firstn")    
}),    columns = [EMAIL PROTECTED](name 
= "surface"),    @ColumnResult(name = 
"volume")})___hibernate-devel 
mailing listhibernate-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/hibernate-devel___hibernate-devel 
mailing listhibernate-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/hibernate-devel


___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


Re: [Hibernate] questions regarding development setup

2006-06-10 Thread Max Andersen
Title: RE: [Hibernate] questions regarding development setup







Yes, but no such thing exist AFAIK. That is why we introduced this failureExpected notion.

/max

-Original Message-
From: Scott M Stark
Sent: Sat 10-06-2006 17:32
To: Max Andersen; Szczepan Faber
Cc: hibernate-devel@lists.sourceforge.net
Subject: RE: [Hibernate] questions regarding development setup

Its more a limitation of the testing environment than project structure. One should be able to annotate known tests as failing at either the test or ci layer to achieve a simple boolean overall result as to whether the testsuite is in an expected state.

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]] On
> Behalf Of Max Rydahl Andersen
> Sent: Friday, June 09, 2006 10:03 AM
> To: Szczepan Faber
> Cc: hibernate-devel@lists.sourceforge.net
> Subject: Re: [Hibernate] questions regarding development setup
>
>
> >> The day you write a (needed and usefull!) unittest that is not
> >> possible in our current setup then lets talk ;)
> >
> > I've already created patch with couple testcases using same package
> > layout on purpose.
>
> ok.
>
> >> No reason to change what just works.
> >
> > reasons: every time the developer cannot unit test
> non-public method /
> > class w/o public constructor. (every day :) ?)
>
> well, it has never been an issue since we have more than
> enough tests that does this, so again it just works.
>
> > Anyway I will just contribute a patch and let's see what you say...
>
> ok.
>
> > PS
> > Whatever you say, the failing tests / unreasonable test
> packaging just
> > impact the project credibility. But it's just my opinion and my
> > collegues.
>
> unreasonable test packaging ? Nothing *prevents* you from
> using another layout - and since our testsuite contains
> considerable more test than I've seen compared to other
> applications/frameworks it doesn't seem to be an issue in
> real life vs. 
> theoretical rants.
>
> And do you rather want us to remove tests for known issues ?
> That sounds like you want us to hide the fact we know some
> part has a bug/issue ? how is that for credibility ?
>
> /max





___
hibernate-devel mailing list
hibernate-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hibernate-devel


RES: [Hibernate] query statistics

2005-11-24 Thread Max Andersen
Title: RE: [Hibernate] query statistics






just a quick 
response.
 
the priorities for the tools 
is:
 
A. get the underlying sql(s)
B. get the guessed types of the 
parameters
C. get the locations of the parameters in 
HQL and SQL
 
A and B is most important (and should be 
gettable without actually executing the query),
C is not important since I can, at 
least for HQL, aproximate this.
 
So dont let C hold a better solution back if that is the 
case.
 
;max 


De: [EMAIL PROTECTED] 
em nome de Steve EbersoleEnviada: qui 24-11-2005 
03:53Para: Gavin King; Hibernate develAssunto: RE: 
[Hibernate] query statistics

Well more I was thinking of delaying the param-list expansion 
untilexecution-time and handling it behind either the query-plan or 
thetranslators.There is an issue with the tools (or clients of Query 
in general)getting access to the actual sql to be performed.  
Essentially, it wouldnot be available until after all parameter lists have 
been set.  Butafaict, this is the case regardless of which approach we 
choose here.So the other option would be to keep param list expansion 
inAbstractQueryImpl, but then pass both the "source query" and 
the"expanded query" to locate the query plan; the "source query" 
reallyonly being used for statistics.Another issue here (though 
afaict this only affects tools) is properresolution of named parameter 
locations corresponding toparameter-lists.  This is due to the fact 
that, in the current setup,the translator only ever knows about the expanded 
query.-Original Message-From: Gavin KingSent: Monday, 
November 21, 2005 8:55 AMTo: Steve Ebersole; 'Hibernate devel'Subject: 
RE: [Hibernate] query statisticsRight. The only downside would be 
increased mem usage, I suppose.-Original Message-From: Steve 
EbersoleSent: Monday, November 21, 2005 6:54 AMTo: Gavin King; 
'Hibernate devel'Subject: RE: [Hibernate] query statisticsI guess we 
could make it so.  This issue is that currently it does notknow the 
non-expanded query.-Original Message-From: Gavin 
KingSent: Monday, November 21, 2005 8:51 AMTo: Steve Ebersole; Hibernate 
develSubject: RE: [Hibernate] query statisticsCould the query plan 
cache both expanded and non-expanded SQL?-Original 
Message-From: [EMAIL PROTECTED][mailto:[EMAIL PROTECTED]] 
On Behalf Of SteveEbersoleSent: Monday, November 21, 2005 6:49 AMTo: 
Hibernate develSubject: [Hibernate] query statisticsIn relation 
tohttp://opensource2.atlassian.com/projects/hibernate/browse/HHH-73(Statistics 
for HQL queries use pre-processed query string):The original issue 
behind this case is now easy to fix because of theintroduction of query 
plans.  The query plans know about the querystrings before any 
processing has occurred.  So simply moving the statsAPI calls into the 
query plans will get around the mentioned issue.However, I brought up 
another point there regarding parameter-listexpansion.  Currently, this 
is done within the QueryImpls, such that theexpansion has occurred before 
the query string even gets to queryplans/translators.  This leads to 
scenarios where the HQL:"from Animal where description in 
(:descriptionList)"Results in different statistics being tracked based on 
the number ofparameters actually contained in the bound 
descriptionList.To me, for the same arguments as the original issue, it 
is non-intuitiveto issue "from Animal where description in 
(:descriptionList)" as an HQLquery, but to see things like "from Animal 
where description in(:descriptionList0_, :descriptionList1_)" in the 
statistics.The flip side of this is that "correcting" this behavior 
means delayinggeneration of the actual SQL until the QueryParameters are 
actuallyknown.  AFAICT, this really only effects the tools since the 
tools wantto display the translated SQL within the console; however, the SQL 
maynot be fully resolvable at that point in time if we start delaying 
theresolution of the SQL till execution.So I wanted to open this up 
for discussion.  What makes the most 
sensehere? ---This 
SF.Net email is sponsored by the JBoss Inc.  Get Certified 
TodayRegister for a JBoss Training Course.  Free Certification Exam for 
AllTraining Attendees Through End of 2005. For more info visit:http://ads.osdn.com/?ad_idv28&alloc_id845&op=ick___hibernate-devel 
mailing listhibernate-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/hibernate-devel---This 
SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor 
problems?  Stop!  Download the new AJAX search engine that 
makessearching your log files as easy as surfing the  web.  
DOWNLOAD SPLUNK!http://ads.osdn.com/?ad_idv37&alloc_id865&op=ick___hibernate-devel 
mailing listhibernate-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/l

RE: [Hibernate] Mixing and

2005-06-16 Thread Max Andersen
Title: [Hibernate] Mixing  and 






yes - i remember some 
mapping support case that had this.
Just cant remember the case ;)
 
/max


From: 
[EMAIL PROTECTED] on behalf of Emmanuel 
BernardSent: Thu 16-06-2005 20:31To: 
hibernate-devel@lists.sourceforge.netSubject: [Hibernate] Mixing 
 and 

Hi guys,Have you ever seen a mix and match between formulas 
and columns in amapping.      foo2 + 
barThis complexify the annotations 
(user experience, not the binding code),so I'm wondering whether I should 
allow this kind of structure or 
not.Emmanuel  
   ___Appel 
audio GRATUIT partout dans le monde avec le nouveau Yahoo! 
MessengerTéléchargez cette version sur http://fr.messenger.yahoo.com---SF.Net 
email is sponsored by: Discover Easy Linux Migration Strategiesfrom IBM. 
Find simple to follow Roadmaps, straightforward articles,informative 
Webcasts and more! Get everything you need to get up tospeed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click___hibernate-devel 
mailing listhibernate-devel@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/hibernate-devel




RE: [Hibernate] Complex class loaders hierarchy

2005-06-14 Thread Max Andersen
Title: [Hibernate] Complex class loaders hierarchy






 
cant see your attachement (at netcafe ,), but im quite sure this is 
not the right solution to this *eclipse* problem ,)
 
And I cant recall having this issue when installing own 
classloader.
 
you should go to eclipse and look for the bug talking about buddy 
classloading which can handle
this via eclipse classloader madness.
 
max



From: 
[EMAIL PROTECTED] on behalf of Ivan S. 
DubrovSent: Tue 14-06-2005 17:00To: 
hibernate-devel@lists.sourceforge.netSubject: [Hibernate] Complex 
class loaders hierarchy

Hello,I've trying to use Hibernate in the environment 
with complex classloaders hierarchy (Eclipse plugin). During my experiments I've 
found the following problem. In order to proxy generation (via cglib) to work it 
is required that HibernateProxy is visible from the classloader that loads mine 
entities (since CGLib Enhancer by default uses superclass 
classloader).But in mine environment this is not true, since I do not 
want to make plugin with entities to depend on the plugin with Hibernate jar (so 
hibernate classes are not visible from the classloader that loads 
entities).To make Hibernate see my entities I set my own thread context 
classloader that "sees" both Hibernate jars and enities. So what I want is to 
make Enhancer use this classloader when generating proxy too.I propose 
the following modification to the CGLIBLazyInitializer:First, try 
generate proxy with default classloaders (superclass classloader). If it fails, 
try to generate proxy with Enhancer classloader set to the current thread 
context classloader. I think, this will be consistent with current 
implementation, since it already uses thread context classloader to load 
entities (so why not to use this classloader for proxy generation 
too?).I've attached a simple patch for this issue that shows the 
idea.




SV: [Hibernate] Index creation on PK (Hibernate3, Gupta SQL Base)

2005-02-03 Thread Max Andersen
Title: RE: [Hibernate] Index creation on PK (Hibernate3, Gupta SQL Base)






Yes - all the unit 
tests.
 
-max


Fra: Sergey Menis 
[mailto:[EMAIL PROTECTED]Sendt: to 03-02-2005 17:21Til: 
Max Andersen; hibernate-devel@lists.sourceforge.netEmne: RE: 
[Hibernate] Index creation on PK (Hibernate3, Gupta SQL 
Base)

Max,Thank you for your reply. It seems I am the only 
one, messing withSQLBase :)I have partially completed the SQLBaseDialect 
and patched theConfiguration inaddition to Dialect class. This works for 
my cases so far, yet I have totestedit properly. Once I have something 
"pretty" I will submit a patch toCVS.Are there any predefined test 
procedures you have developed for theDialects?Thank 
you,Sergey Menis-Original Message-From: Max Rydahl 
Andersen [mailto:[EMAIL PROTECTED]]Sent: 
Monday, January 31, 2005 7:12 AMTo: Sergey Menis; 
hibernate-devel@lists.sourceforge.netSubject: Re: [Hibernate] Index creation 
on PK (Hibernate3, Gupta SQLBase)On Mon, 24 Jan 2005 14:42:38 -0500, 
Sergey Menis <[EMAIL PROTECTED]>wrote:I didn't notice if you 
got an answer to this yet - so just ignore me ifotherwise ;)You are 
correct about your need to extend configuration/dialect.You probably 
also need to look at Table.primaryKey and see where it isused when creating 
primary keys.I also *think* HSQLDialect has the same issues and that it 
is nothandled in a good way at the moment (some instanceof 
HSQLDialectsomewhere).Thus you should add something like 
"requireAlterTableForPrimaryKey()" orsomething to Dialect to handle it more 
smoothly./max>  All,>> I am in the process 
of creating a dialect to communicate with Gupta> SQLbase database. 
Currently I am facing a problem of "Table in> incomplete state". 
According to Gupta this problem is caused by a> missing index on the 
primary key. This appears to be correct since> there are no indexes 
created on my table (NOTATION), once the> SchemaExport runs. I have 
tested the same mapping documents and> identical code on MSSQL Server, 
using the provided dialect> (SQLServerDialect) and there are no problems 
with index creation. This> is due to the fact that indexes on primary 
key are created implicitly> under such DBs as Oracle and MSSQL Server. 
Unfortunately this is not> the case with Gupta SQL Base, where the index 
must be createdexplicitly. Hence my question:>> Since this 
problem is DB specific, any ideas on how to incorporate> functionality to 
force explicit index creation on PK, after table> 
generation?>> As I understand it I am faced with 
extending:>> org.hibernate.cfg.Configuration> 
org.hibernate.dialect.Dialect> + my own dialect>> I have 
less then a month of exposure with Hibernate so there are> probably many 
misconceptions in the above. Please correct me if you> see anything 
wrong.>> Thanks,>> Sergei>> 
RELEVANT INFORMATION** Hibernate> 
version: Hibernate3>> Full stack trace of any exception that 
occurs:>>> [java] 12:19:02,110 DEBUG SQL:290 - insert into 
NOTATION (NOTE, TYPE,> OWNER_ID, CREATE_DATE) values (?, ?, ?, ?) [java] 
Hibernate: insert> into NOTATION (NOTE, TYPE, OWNER_ID,> 
CREATE_DATE) values (?, ?, ?, ?)> [java] 12:19:02,110 DEBUG 
AbstractBatcher:341 - preparing statement> [java] 12:19:02,157 DEBUG 
JDBCExceptionReporter:49 - SQL Exception> [java] java.sql.SQLException: 
01417 DLU TIC Table in incomplete state>> [java] at> 
jdbc.gupta.sqlbase.SqlbaseStatement.SQLException(SqlbaseStatement.java> 
:8> 26)> [java] at> 
jdbc.gupta.sqlbase.SqlbasePreparedStatement.(SqlbasePreparedStat> 
em> ent.java:147)> [java] at> 
jdbc.gupta.sqlbase.SqlbasePreparedStatement.(SqlbasePreparedStat> 
em> ent.java:92)> [java] 
at>jdbc.gupta.sqlbase.SqlbaseConnection.prepareStatement(SqlbaseConnection.> 
java:195)> [java] 
at>org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.> 
java:349)> [java] at> 
org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.ja> 
va> :71)> [java] at> 
org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.ja> 
va> :65)> [java] at> 
org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatch> 
er> .java:125)> [java] at> 
org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersist> 
er> .java:1653)> [java] at> 
org.hibernate.persister.BasicEntityPersister.insert(BasicEntityPersist> 
er> .java:2006)> [java] 
at>org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:> 
42)> [java] at> 
org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:232)> 
[java] at> 
org.hibernate.impl.ActionQueue.executeActions(ActionQueue.java:137)> 
[java] at> 
org.hibernate.event.AbstractFlush

SV: [Hibernate] Re: [PRODUCT] ORM + RDBMS = OODBMS / Evaluation Against Fictive jamStore

2004-12-23 Thread Max Andersen



want to start in 10 min ?
 
Then take the quick start guide...available from the hibernate.org 
documentation site as the first link.
 
/max




SV: [Hibernate] Test suite now has 12 errors, up from 11

2004-12-19 Thread Max Andersen
Title: [Hibernate] Test suite now has 12 errors, up from 11






yes my bad. forgot to commit 
the last change i did - will do it later today when i get back to my 
box.
 
-max


Fra: [EMAIL PROTECTED] 
på vegne af Joshua DavisSendt: sø 19-12-2004 03:09Til: 
Hibernate-DevelEmne: [Hibernate] Test suite now has 12 errors, up 
from 11

ConfigurationPerformanceTest is having a NPE every time I run 
it.---SF 
email is sponsored by - The IT Product GuideRead honest & candid reviews 
on hundreds of IT Products from real users.Discover which products truly 
live up to the hype. Start reading now.http://productguide.itmanagersjournal.com/___hibernate-devel 
mailing list[EMAIL PROTECTED]https://lists.sourceforge.net/lists/listinfo/hibernate-devel




SV: [Hibernate] Central configuration for mappings?

2004-12-18 Thread Max Andersen
Title: [Hibernate] Central configuration for mappings?






Hi,
 
this is a user question so you should go to 
the user forum.
 
But because its christmans i'll point you 
in the direction - look at NamingStrategy which allows you 
to control it quite nicely 
IMO.
 
-max


Fra: [EMAIL PROTECTED] 
på vegne af Anthony SchexnaildreSendt: lø 18-12-2004 
17:56Til: Hibernate developmentEmne: [Hibernate] Central 
configuration for mappings?

I am developing a framework that uses hibernate for persistence. 
I amtrying to figure out a way to have a central config for attributes 
inthe hbm.xml files. For example, I would like to be able to change 
allthe table/column names without having to edit the hbm.xml files in 
theframework. Any best practices? 
Thoughts?-Anthony---SF 
email is sponsored by - The IT Product GuideRead honest & candid reviews 
on hundreds of IT Products from real users.Discover which products truly 
live up to the hype. Start reading now.http://productguide.itmanagersjournal.com/___hibernate-devel 
mailing list[EMAIL PROTECTED]https://lists.sourceforge.net/lists/listinfo/hibernate-devel