Re: [Hibernate] Length of Hibernate-generated aliases in SQL
Could you give an hbm.xml and query example that gives that error ? (it would be nice to have some test scenario :) (especially, since it would be nice to know what one could do to avoid such a thing- it would also be a problem on db2 since it also has some "weird" low limitations) /max Yick. The biggest design problem with Hibernate at present is the fact that we have no single class responsible for rendering SQL. (As I have mentioned before, Hibernate models SQL statements using StringBuffer...) So little things like this that should be *very* easy turn out to be way more tricky than you expect. However there are a couple of methods that are responsible for dealing with SQL quoted identifiers so you may be able to hook in there. We *do* need to fix this problem of StringBuffer being used everywhere. -Original Message- From: Mark Woon [mailto:[EMAIL PROTECTED] Sent: Wednesday, 1 January 2003 10:33 AM To: Hibernate Mailing List Subject: [Hibernate] Length of Hibernate-generated aliases in SQL Does Hibernate do any checking on the length of the aliases it generates when it creates it's SQL queries? I'm getting "identifier is too long" errors against Oracle 9.2 at the moment because Hibernate tacks on some extra text to some column names. If not, would it be terribly difficult to add this functionality? Which classes should I be looking at to figure this out? Thanks, -Mark --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Length of Hibernate-generated aliases in SQL
Gavin King wrote: Max, it would happen whenever you have a column name that approaches the limit for the database. Hibernate needs to add an _0, etc at the end when rendering aiases. I know, would just be easier if he got a clean example :) But Ok - I've fought with these kind of troubles before and at that time we just limited our selfes to use shorter column names :) (the easy solution - and is "ok" as long as we are using the column names and not the propertynames in the SQL generated by HQL) Another one is to rewrite the code that produces those aliases (and as I remember - the logic are well-defined but unfortunatly not in a single method). That alias generation should of course use the Dialect class which would have an getMaxColumnNameLength and getMaxTableNameLength. If the aliases generated exceeds that amount "do something" :) Maybe we should just postfix the names with 0_ instead of prefixing them with _0 (and then chop them of with the dialects max lengths..) - that would make them unique and avoid name colisions (as long as the max lenght is not near 3-4 chars ) Just some thoughts /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [HIBERNATE] bin scripts
please - put this in the JIRA instead ;) (look at hibernate.sf.net) Here stuff get lost, in the JIRA it will be persistent until dealt with ;) /max - Original Message - From: "Les Hazlewood" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, August 18, 2003 9:52 PM Subject: [HIBERNATE] bin scripts > Hi all, > > My name is Les, and I've been involved in open source projects for a while, > and I'm interested in possibly joining the Hibernate development team. > > I had the opportunity to meet Gavin this past weekend. We talked a little > about an open source project I started that is still in alpha development > stages (http://dewdrop.sf.net) only to find out that Hibernate now supports > what I was attempting to create (table-per-subclass mapping mechanism, which > didn't exist in Hibernate 6 months ago). Anyway, I'm definitely not one to > reinvent the wheel, so we discussed perhaps migrating my development efforts > to Hibernate, and just helping out in general, and he kindly directed me to > this list. There may still be a place for DewDrop somewhere, so I won't > scrap it just yet. > > Anyway, I downloaded the latest beta binary version of Hibernate this > morning and untarred it to start using it. However, I noticed there were no > linux binary scripts to run. So I created some :) I also re-wrote the > windows batch scripts to be more robust and flexible with respect to how > classpaths are set. > > I didn't test the windows scripts, so someone needs to run them on a windows > box to make sure they work (although the code is pretty trivial and should > run nicely). The linux scripts all work properly (I tested all of them) and > are chmodded to execute permissions. If you manipulate these files in an > ant build (or copy them from one location to another during build time), > please ensure that the ant task sets the execute permissions > properly for *nix users. > > The directory structure of the attached file is as follows: > > bin-scripts > | > |--bin (rewritten and new Hibernate bin scripts, for win and *nix) > | > |--tools > | > |--bin (rewritten and new Tools bin scripts, for win and *nix). > > Naturally, please feel free to format/rewrite/reuse the code however you > feel that it may benefit Hibernate. > > Les Hazlewood > > --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Session-less OR-mapping
> On Sunday 17 August 2003 21:41, Max Rydahl Andersen wrote: > > how about just calling clear() on the session after each "cache less" > > work you need ? > > > > Uhm... what is the overhead of inserting the objects in the cache to > remove them afterwards if you're inserting 200.000 bjects in > the database? Using direct SQL provided a 40% performance increase > compared to the version that was using the cache and the memory > used was around 60MB instead of 170MB (which also means that > the second version would trash badly anything with less than 256 MB, > and remember this is a client application). I guess that calling clear() would > limit the memory used, but would also generate more garbage? (I mean, the > cache also contains a serialized version of the object or something similar to > catch what changed since the session begin, ins't it?) What if YOU just reused the same object instance for your 200.000 objects between each clear() call ? Then Hibernate should only do a few things that probably in your usecase scenario could be classifed as "garbage", but in all other aspects are Good Things ;) And also remember to fiddle with your -mx and -gc jvm settings to tune your VM to be better at handling such memory bursts! It can make quite a big difference - without changing a single line of code! Best regards, Max --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Session-less OR-mapping
it is in the CVS (v21branch) /max - Original Message - From: "Andrea Aime" <[EMAIL PROTECTED]> To: "max" <[EMAIL PROTECTED]> Cc: "hibernate list" <[EMAIL PROTECTED]> Sent: Tuesday, August 19, 2003 10:28 AM Subject: Re: [Hibernate] Session-less OR-mapping > max wrote: > > > >> On Sunday 17 August 2003 21:41, Max Rydahl Andersen wrote: > >> > how about just calling clear() on the session after each "cache less" > >> > work you need ? > >> > > >> > > Oh, by the way, there is no "clear()" method in Session interface as > of Hibernate 2.0.2. Is it a recent (CVS) addition? Or you do mean to > call s.evict(Object)? Last time I tried the last one, object won't be > saved when s.flush() was called (no object in cache -> no sql generated). > > > Andrea > > > > --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Ansi Sql query
Read the docs about inner and outer join HQL queries. /max ps. you can do it - have you even tried to use that query ? ;) - Original Message - From: Prasad Iyer To: [EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 1:16 PM Subject: [Hibernate] Ansi Sql query Query query=session.createQuery("select message from Message as message inner join inbox on Message.inbox_id=inbox.id where inbox.user_id=?"); query.setParameter(1, user_id); Can I do something like this assuming I have Message bean thanks regards prasad chandrasekaran
Re: [Hibernate] Ant build for Avalon wrapper
> I haven't updated the Avalon wrapper to work with Hibernate 2.1.1, however I > am testing it, and it seems to work with no changes at all. However, I > noticed the other HibernateExt stuff still seems to reference 2.0 versus 2.1 > as well. Should we look to make a new release now that 2.1 is out? We might do it around the new year - since hbm2java and hibern8ide also is starting to have nice new features that people might be interested in. /max --- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
SV: [Hibernate] Central configuration for mappings?
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
SV: [Hibernate] Test suite now has 12 errors, up from 11
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] Re: [PRODUCT] ORM + RDBMS = OODBMS / Evaluation Against Fictive jamStore
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] Index creation on PK (Hibernate3, Gupta SQL Base)
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
RE: [Hibernate] Complex class loaders hierarchy
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.
RE: [Hibernate] Mixing and
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
RES: [Hibernate] query statistics
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__
Re: [Hibernate] questions regarding development setup
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
Re: [Hibernate] New error on Annotation query
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] Mass Deletes
[EMAIL PROTECTED] wrote: Many users have asked for session.delete("from Foo foo where foo.count=0"); to issue a single SQL DELETE. This is certainly not possible for objects with collections or cascades (though it might not matter if we ignore Lifecycle callback; not sure). For other classes it is conceptually possible. Now, this is really quite easy to implement - it would take me about 1-2 hours to do it. But my big problem is: how do we know which _loaded_ objects were deleted? I don't think there is any good way to do this. All we get back from DELETE is a row count. * Do we issue a SELECT beforehand, to fetch the ids . and then issue the delete? * Do we just disable mass delete for classes which have loaded instances? * Is it simply not worth it? The select-then-delete option doesn't seem particularly better than the current situation when JDBC batch updates are enabled. The disable-when-instances-are-loaded option looks like it would work, but only for some very limited usecases (though it may work for the usecases we are most interested in). Thoughts? I would go for the disable-when-instances-are-loaded option. And we should need some small support methods like: "isMassDeletable(Class c)" or "isMassDeletable(String hql), something to be able to query on the state to find possible answers to why my delete("from People f where f.location = 'Earth') takes a billion years instead of just a couple of seconds ;) Btw. how would joins fit into this scenario ? Is any/all HQL query deletable ? Can one find out upfront without issuing the delete ? /max --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Mass Deletes
ok, but MS Transact-SQL server does ;) http://www.devguru.com/Technologies/sqlsyntax/quickref/sql_syntax_delete.html Also found some other stuff indicating that some of the other major db's has delete with join features, but there syntax looks very different But it seems true that it does not work on most other db's. /max [EMAIL PROTECTED] wrote: AFAICT, databases do not support DELETEs with joins |-+> | | Max Rydahl | | | Andersen | | | <[EMAIL PROTECTED]> | | || | | 04/08/03 06:32 PM| | || |-+> >--| | | | To: [EMAIL PROTECTED] | | cc: [EMAIL PROTECTED] | | Subject: Re: [Hibernate] Mass Deletes | >--| [EMAIL PROTECTED] wrote: Many users have asked for session.delete("from Foo foo where foo.count=0"); to issue a single SQL DELETE. This is certainly not possible for objects with collections or cascades (though it might not matter if we ignore Lifecycle callback; not sure). For other classes it is conceptually possible. Now, this is really quite easy to implement - it would take me about 1-2 hours to do it. But my big problem is: how do we know which _loaded_ objects were deleted? I don't think there is any good way to do this. All we get back from DELETE is a row count. * Do we issue a SELECT beforehand, to fetch the ids . and then issue the delete? * Do we just disable mass delete for classes which have loaded instances? * Is it simply not worth it? The select-then-delete option doesn't seem particularly better than the current situation when JDBC batch updates are enabled. The disable-when-instances-are-loaded option looks like it would work, but only for some very limited usecases (though it may work for the usecases we are most interested in). Thoughts? I would go for the disable-when-instances-are-loaded option. And we should need some small support methods like: "isMassDeletable(Class c)" or "isMassDeletable(String hql), something to be able to query on the state to find possible answers to why my delete("from People f where f.location = 'Earth') takes a billion years instead of just a couple of seconds ;) Btw. how would joins fit into this scenario ? Is any/all HQL query deletable ? Can one find out upfront without issuing the delete ? /max ** Any personal or sensitive information contained in this email and attachments must be handled in accordance with the Victorian Information Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988 (Commonwealth), as applicable. This email, including all attachments, is confidential. If you are not the intended recipient, you must not disclose, distribute, copy or use the information contained in this email or attachments. Any confidentiality or privilege is not waived or lost because this email has been sent to you in error. If you have received it in error, please let us know by reply email, delete it from your system and destroy any copies. ** --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Bug in CharacterType...
hehe - I asked on this list BECAUSE it was in the first CVS revision and had not changed since then - so I was not really sure if it was intentional or not :) But now its fixed and my generic browser works again :) (note: I have also submitted a patch - so if you have checked something in, please update the patch tracking too :) /max p.s. looking forward to the prize :) - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "Max Rydahl Andersen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, October 25, 2002 1:48 PM Subject: Re: [Hibernate] Bug in CharacterType... > Wow, what an absolutely ancient bug!! Its in the very first CVS revision. > Easy to see how it could slip through, though. I doubt many people have > properties of type java.lang.Character > > You get some kind of prize for that. > > - Original Message - > From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, October 25, 2002 7:17 PM > Subject: [Hibernate] Bug in CharacterType... > > > > Hi! > > > > The following code is found in CharacterType: > > public Object get(ResultSet rs, String name) throws SQLException { > > > > return new Character(rs.getString(name).charAt(0)); > > > > } > > > > > > > > Shouldn't this be something like the following to avoid a possible null > > value ?!: > > > > public Object get(ResultSet rs, String name) throws SQLException { > > > > String s = rs.getString(name); > > > > if(s!=null) { > > > > return new Character(s.charAt(0)); > > > > } else { > > > > return null; > > > > } > > > > } > > > > > > > > > > > > > > --- > > This sf.net email is sponsored by: Influence the future > > of Java(TM) technology. Join the Java Community > > Process(SM) (JCP(SM)) program now. > > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > > ___ > > hibernate-devel mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > --- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] junit test for hypersonic fails ...
Hi! I wanna be able to develop on my laptop (Don't wanna have a full blown db installed on it's slow disk) So, while trying to make most of the junit tests run on a Hypersonic db I found the following and was wondering if this is common knowledge or/and expected behavior: ABCProxyTest and ABCTest - Uses count as a property, that is a preserved word in Hypersonic DemoTest - there is a thread.sleep which is not reliable, it always timesout before the datastore is setup. Maybe we should make a more explict synchronization n the datastore ? MasterDetailTest relies on the dialect having support for sequences - should we maybe have an expected exception if dialect is hibernate (or any other without support for dialects ? MultiTable fails with a cirrus.hibernate.QueryException: Incorrect query syntax [from s in class Simple where s.count>0] at cirrus.hibernate.query.QueryTranslator.compile(QueryTranslator.java:148) at cirrus.hibernate.query.QueryTranslator.compile(QueryTranslator.java:123) at cirrus.hibernate.impl.SessionFactoryImpl.getQuery(SessionFactoryImpl.java:30 5) at cirrus.hibernate.impl.SessionFactoryImpl.getScalarQuery(SessionFactoryImpl.j ava:287) at cirrus.hibernate.impl.SessionImpl.getQueries(SessionImpl.java:1092) at cirrus.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1120) at cirrus.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1110) at cirrus.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1102) at cirrus.hibernate.test.MultiTableTest.testMultiTable(MultiTableTest.java:79) It seems as it cannot parse "s.count" in "from s in class Simple where s.count>0" can the newly quote patch have messed something up ? ODMGTest only passes if hibernate.jdbc.use_streams_for_binary is set to false (because hsqldb presumably cannot handle binary's that has a Null value (it creates a binarystream on a null buffer) (Is this documented somewhare ?) In ParentChildTest the tables are not created ? ;( Many "Unsuccessful: Wrong data type: CONTAINER_ID in statement [create table Contained (container_id BIGINT NOT NULL IDENTITY)]" when creating schema test. Anyone know what is wrong ? I have tested it with the newest hsqldb 1.7 driver ... /max --- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] pre-Codegen enhancements
Hi! Just letting you know that I now has implemented support for the attribute in Hibernate hbm.xml. My local codegenerator does now support the following tags. "description" - Text that will be included as an javadoc comment "extends" - name of the class the entity class should extend. Is ignored in subclass and joined-subclass. "implements" - name of an interface the entity class should implement. Can be repeated N times. "generated-class" - name that the codegenerator should use instead of the actual mapped class. This class would then be extended by the actual mapped class (done by the user) A fullblown example could be as follows: codegen.test.AbstractPersistent codegen.test.IVersionable codegen.test.IAuditable codegen.test.AutoPerson AutoPerson is a simple class, which illustrates the possibilities of the Hibernate meta tag. @author Zim Zala Bim A javadoc comment for the field name... And this currently gives the following code: package codegen.test; import java.io.Serializable; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import org.apache.commons.lang.builder.ToStringBuilder; /** * AutoPerson is a simple class, which illustrates the possibilities of the Hibernate meta tag. * @author Zim Zala Bim */ abstract public class AutoPerson extends codegen.test.AbstractPersistent implements Serializable, codegen.test.IVersionable, codegen.test.IAuditable { /** identifier field */ private String id; /** * A javadoc comment for the field name... */ private String name; /** nullable persistent field */ private codegen.test.User myUser; /** full constructor */ public AutoPerson(java.lang.String id, java.lang.String name, codegen.test.User myUser) { this.id = id; this.name = name; this.myUser = myUser; } /** default constructor */ public AutoPerson() { } /** minimal constructor */ public AutoPerson(java.lang.String id) { this.id = id; } public java.lang.String getId() { return this.id; } public void setId(java.lang.String id) { this.id = id; } public java.lang.String getName() { return this.name; } public void setName(java.lang.String name) { this.name = name; } public codegen.test.User getMyUser() { return this.myUser; } public void setMyUser(codegen.test.User myUser) { this.myUser = myUser; } public String toString() { return ToStringBuilder.reflectionToString(this); } public boolean equals(Object other) { if ( !(other instanceof AutoPerson) ) return false; AutoPerson castOther = (AutoPerson) other; return new EqualsBuilder().append(this.id, castOther.id).isEquals(); } public int hashCode() { return new HashCodeBuilder().append(id).toHashCode(); } } I'll work a little more with regards to adding support for these meta-tags for composites, and all the collection types (if at all reasonable) + a wiki page describing the capabilities of the codegenerator. Hope you like it :) I welcome any comments :) /max p.s. A side question: Does anyone have an "Good Code Example" for which code you would like to be generated for add and remove methods for bi-directional collections ? --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] jcs cache
Just needs to be sure about this one (have told my coworker something else, i think :) The cached entities will still have correct == semantics, right ? so, ... s1 = sf.openSession(); p1 = s.load(Person.class, 42); // p is loaded from db and a copy of it is put in the global cache p2 = (Person)s.find("from p in Person where p.id = 42).list().iterator().next(); assertEquals(p,p1); // equals MUST hold assertSame(p,p1); // but how about this one ? is p==p1 ? (which I would expect :) s.flush(); s.close(); s2 = sf.openSession(); p3 = s.load(Person.class, 42); // p is copied from cache p4 = (Person)s.find("from p in Person where p.id = 42).list().iterator().next(); assertSame(p3,p4); assertSame(p1,p3); // this one fails because of the copy-from-cache semantics, right ? (which is ok) s.flush(); s.close(); /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 18, 2003 4:30 AM Subject: Re: [Hibernate] jcs cache > > The cache is not used for *queries*. It is used for calls to load() > and for resolving associations. > > Also note that the cache does not store actual Vertex instances; it > stores a *copy* of the state of the vertex. So an instance retrieved > from the cache will always be a different instance from the one that > went in there. This is essential to how Hibernate's multi-version- > concurrency caching mechanism works. (Hibernate NEVER causes threads > to block!) > > > > > --- > This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will > allow you to extend the highest allowed 128 bit encryption to all your > clients even if they use browsers that are limited to 40 bit encryption. > Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] implemented outerjoin fetching for single-column queries...
What does the subject from the cvs commit message actually mean ? :) (I thought Hibernate already outerjoin fetched in every kind of query ?) /max --- This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] hibernate unittests not "compatible" with eclipse...
Hi! I've had my shear of problems running the junit tests from inside eclipse, and now I've found out why :) Running the junit tests from the command line seems always to work, but from eclipse I constantly get "No persisters found for XXX" where XXX is some class being saved in the test. The problem is that the junit test assumes that only one test is created at the time AND that the suite() method is invoked before running the tests - all this is correctly assumed when using the standard junit runner, but no from within eclipse where one have much more fine grained control and eclipse is being "intelligent" :) 1. It does not invoke the suite() method if you just try to do "Run As...->JUnit test" 2. And when trying to run more or all test in a certain folder/project then it instantiate all tests before running the actual tests! That conflict with the usage of the static sessions variable in TestCase :( Have noone else have these problems ? Are you all runing it via cmdline or the ant file ? Notice that eclipse is just assuming that all tests are selfcontained (as they should be) and that everything is being configured via setup and teardown methods. How about we changed the test suite to be more self contained ? (e.g. having a non-static holder for the sessions ?, and only recreate the database if this field is null ?) /max --- This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] collections (in one-to-many, many-to-one, etc..)
Hi! Just need some thing explained :) How does Hibernate decide/track how to delete, update, insert tuples based on what the user has added and/or removed in the sets/lists representing many-to-one and many-to-many mappings ? (the question just came to my mind when i saw: "P.S. Hibernate is *not* tracking which objects were removed from the collection (also a Good Thing)." - and I came to think: Ok, but then how does it decide to do a delete of something if it does not track deletions :) (I guess there are an simple and an more advanced explanation - I like them both :) /max --- This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] try/finally in testcode ?
> I'm sure we *should* have some try / finallys. But adding them to all the > tests is going to be hard work. Up and till now I had kinda preferred the > way the tests actually stop when an exception occurs. I makes debugging > quicker. They don't stop, do they ? They halt - and waitand waits...and waits :) But if noone can see anything wrong to add try/finally to ensure closing/releasing connections in junit's I will suggest to not add or modify tests without having the try/finally stuff in place for the new or modified test. > > - Original Message - > From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, November 03, 2002 9:50 AM > Subject: [Hibernate] try/finally in testcode ? > > > > Hi! > > > > It seems there are "some" bug regarding the cgilib enhancer - or ? > > > > Well, a derived problem from this is that the unit tests fails while > having > > open connections to the db! > > Shouldn't we surround s.open/s.close with a try/finally where the finally > > block just tries to close the connection ? > > This will allow the tests to continue even though one test has previously > > failed - if close is not called (MSQL at least) has > > problems letting the code continue (it simply deadlocks :( > > > > /max > > > > > > > > --- > > This sf.net email is sponsored by: See the NEW Palm > > Tungsten T handheld. Power & Color in a compact size! > > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > > ___ > > hibernate-devel mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] DynaBean components
I've also often posed that question my self :) The only answer I have found is that DynaBean's can now about their properties values/type before the actual value is placed there . e..g If a Map does not contain a value for "name" it returns null. A DynaBean can return an default value of the correct type (and default could just as well be null) AND it can return information about the actual type of the property (in this example java.lang.String) where as with an map you can only assume it as "java.lang.Object" but is that all that great ? What are the actual advantages ? /max - Original Message - From: "Juozas Baliuka" <[EMAIL PROTECTED]> To: "Gavin King" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, January 19, 2003 4:17 PM Subject: Re: [Hibernate] DynaBean components > > > It was idea in cglib to implement true "DynaBean", but I can not find use > case for this stuff (possible as workaround for some > Bean, but not Map enabled scripting languages). > As I understand "DynaBean" form [beanutils] is some kind of adapter for map, > why do not > to use "normal" Map directly ? > > > > I added support for DynaBean components to Hibernate2. You can now > > use mappings like: > > > > > > . > > > > > > > > > > > > > > > > > > Can people please try this out, to check that I didn't get anything > > wrong; I am new to DynaBeans, so I'm not sure I am using it right. > > (Like all the Jakarta stuff it is completely underdocumented.) > > > > What I didn't find was a way to do the equivalent of Class.forName() > > to retrieve a DynaClass. So Hibernate and the user code aren't > > actually using the same DynaClass instance, which is suboptimal. > > > > > > > > > > > > > > --- > > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > > are you planning your Web Server Security? Click here to get a FREE > > Thawte SSL guide and find the answers to all your SSL security issues. > > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > > ___ > > hibernate-devel mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > --- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Single Identity column support for MSSQL ?
As seen in http://sourceforge.net/forum/message.php?msg_id=1718579 it is actually possible to have MSSQL support that a has only a single identity column which is the case in many of the JUnit tests, but I've looked into the query generation and I don't see any calls to the Dialect for generating the sql insert string, thus I don't now exactly where to detect and then modify the sql string accordingly when it is needed to do a "insert into foo default values;" instead of "insert into foo values ();" (which is the sql currently generated) Can someone? ;) /max --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Lazy Collections
No! If an session has been closed forcefully or by other means, hibernate internals should not reopen the session - at least not per default! If the session has been closed there is a reason for it - one might be to ensure that the ui-layer does not accidently fetches data by "dotting" around in the object graph. If you want the session to be (re)opend - why don't you just keep the session open ? /max - Original Message - From: "Jonas Van Poucke" <[EMAIL PROTECTED]> To: "Hibernate Developers" <[EMAIL PROTECTED]> Sent: Tuesday, December 03, 2002 9:20 AM Subject: [Hibernate] Lazy Collections The implementation of the write() method in cirrus.hibernate.collections.PersistentCollection states: protected final void write() { initialize(true); if ( session!=null && session.isOpen() ) session.dirty(this); } This means the session needs to be open. Also, the Docs mentions that lazy collections need to have an open session. Could we safely modify the code to reopen the session when needed? protected final void write() { initialize(true); if ( session != null ) { if ( session.isOpen() ) { session.dirty(this); } else { // Re-open session session.reopen(); // ommitted try-catch session.dirty(this); } } } *** Hou uw internetverbruik beter onder controle ... surf met Tiscali Complete .. http://tiscali.complete.be --- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] 2 Hibernate questions
> Hm, there is no hibernate-user/general, so > I'll ask here and get out quickly. Alternatively you can just ask such questions in the forum http://sourceforge.net/forum/forum.php?forum_id=128638 (but hey, we won't bite in here either, so .. ) > 1. Does Hibernate allow for fine tuning lazy > vs. non-lazy loading? That is, can I > specify when to uze lazy loading and when > not to use lazy loading? Hibernate supports both lazy and non-lazy loading, but Hibernate currently only has support for specifying this in the metadata file, e.g. the lazy/non-lazy settings works globally. There have been discussions on making Hibernate support "fetch profiles" which would allow us to specify lazy/non-lazy fetcthing on a query to query basis :) > 2. Does Hibernate allow me to override it > and specify my own SQL statements in places > where I want to use specific SQL statements? > I know I can always choose not to use > Hibernate in specific portions of my > application, but if I am okay with most DB > accesses going through Hibernate, and have > only very few exceptions, I'd rather specify > the exact SQL to use via Hibername, instead > of using my own 'direct to RDBMS access' > code in parallel. (e.g. I assume you mean something like: // syntax from the top of my head :) q = session.createQuery() q.setSQLQuery("SELECT * FROM pers_table WHERE age > 23"); q.setSQLResultingClass(Person.class); q.list(); // this would return Person.class instances and the requirement for the columns would just be to use the same columnnames as specified in the hbm.xml ) Not yet - but it have also been on my wishlist for a looong time :) (thinks it was the first bug/rfe I made...see : http://sfads.osdn.com/7.html?topic=hibernate,databases,java,45,66,92 /max --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Calling Prepared Statements
Hibernate always uses prepared statements when it is executing its SQL converted from HQL - so..? (If you mean the best way to call raw SQL as prepared statements then you just use the JDBC, but is seldom you'll need it :) /max - Original Message - From: "Raible, Matt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 07, 2003 8:16 PM Subject: [Hibernate] Calling Prepared Statements > I'm guessing the best way to call prepared statements is with JDBC, rather > than Hibernate. Correct? > > Thanks, > > Matt > > > > --- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] MSSQL and sequences test
I've just submitted a small patch to the tests so MSSQL can run the MasterDetailTest. Changes are: 1. Use native instead of the single usage of "sequences" 2. Avoid the usage of "key" as a column as it is a reservered keyword. ad. 2 shouldn't harm anyone as it is just a simple rename, that actually works as an additional test of the column attribute. ad. 1. is "worse" as this was/are the only place in the unittst that sequences are used, but I think it is more important to have MSSQL complete on the MasterDetailTest which includes 10 other tests that is not otherwise executed. What about either: - creating a separate test for the sequences or/and - create an id-generator that is called something like "sequenceOrnative" which will choose sequence if that is availabe in the current dialect and if not choose native ? (and maybe make this more general - like an ordered list of id-generators which could handle it in a more general way) /max --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Codegenerator of the future?
In short: The CodeGenerator of the future (hbm2java) will do the following: Given a set of hbm.xml files it will generate a set of .java files with XDoclet tags included Nothing more - nothing less :) The ReverseGenerator of the future is actual MiddleGen which will do the following: Given a JDBC connection it will generate one (or a set?) of hbm.xml files with tags in them to provide for "feeding" the codegenerator. Nothing more - nothing less :) Hope that clarifies it :) The following ascii art (derived from Gavins previous posting) tries to illustrate the boundaries/responsibilities :) java + @tags ===XDocLet===> hbm.xml ===SchemaExport ===> SQL DDL/JDBC java + @tags <==hbm2java hbm.xml <==MiddleGen====== SQL DDL/JDBC /max - Original Message - From: "Raible, Matt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 11:27 PM Subject: [Hibernate] Codegenerator of the future? > Will the Codegenerator of the future > (http://hibernate.bluemars.net/52.html#17) replace the current > ReverseGenerator? What I mean is that I have used the ReverseGenerator to > create a TableName.java class and it's accompanying TableName.hbm.xml. This > works great and I applaud you all on making this work so nicely. It'd be > cool if the "future" version could generate the .hbm.xml file and then > XDoclet or an Ant Task could be used to generate the actual .java file. OR > maybe it could generate the .java file and have it marked up with XDoclet > tags. I think the current way works great - don't get me wrong - just > wanted to spew my ideas after using it. It'd also be cool if the > ReverseGenerator could generate sets and such for foreign keys to other > tables/classes. > > After using Hibernate at my new job for a couple weeks, and especially the > ReverseGenerator - I must say that Hibernate is the coolest tool I've worked > with in a long time. Maybe it's cause it's new - but I feel the same > excitement about it as I did with Ant and Struts. I think you've developed > an awesome piece of software here and I thank you much for making > it open source - and making my persistence life that much easier. > > You guys are geniuses! > > Matt > > > > --- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Why the name ?
Hi! Can't remember if I've asked this question before, but I couldn't seem to remember nor find it on the mailinglists. Why is Hibernate called Hibernate ? (just curious) Is is it something regarding putting objects to sleep in the cold winterlands of the database ? /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] TODO
> * add @tag generation to hbm2java If anyone can point me to an example of what is expected for this generation, then i'll be glad to look into this one. /max --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Patch/Bug tracking suggestion...
14 hours and no objections - it is hereby done :) Postings at Patches, Bug reports, feature and support request will now be send to the devel list. /max - Original Message - From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 23, 2002 12:03 AM Subject: [Hibernate] Patch/Bug tracking suggestion... > I would like to suggest that we configure Sourceforge to send any > submissions in the Patch and Bug tracking system to the hibernate-devel > list, just so we can keep track of it. > > Anyone against this ? (If noone objects in the next 12 hours, i'll make the > change happen :) > > (If the burden at some time gets to high we can always create a separete > patchbug mailinglist) > > /max > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Anyone up yet another philosophical comparison :)
http://jaxor.sourceforge.net/ A persistence layer "backed up" by the all and mighty Martin Fowler :) Got some nice ideas...but one point made me wonder if Hibernate could do same/better/worse!?: On http://jaxor.sourceforge.net/whyJaxor.htm there is four headlines: Don't Load More Data Than You Have To, Tell Me What Has Changed. Don't Make Me Look!, Death to Duplication and Power of Text. My comments for those blocks are: Don't Load More Data Than You Have To Talks about transparent lazy loading and about the "difficulties" of handling proxies and special code for this. Jaxor solves this by generating the code that handles this (e.g. generating the proxies and the code for it). Hibernate have done this "always" and it is event better today (my opnion): It does not need to generate the proxies upfront by the power of cglib and the code for it is inside hibernate (no need for special case codegeneration for this). Note: Jaxor seems to make a point of generating code instead of having generel reflective codeI see advantages and disadvantages in both. Tell Me What Has Changed. Don't Make Me Look! Here is what it says:"Jaxor, through code generation, has the ability to notify the session exactly when, where, and how objects are changed. In contrast, frameworks using reflection must register the clean state of the object when it's loaded, then upon committing the session the state of the object is compared against it's original state to see if it has changed. If thousands (or hundreds of thousands) of objects are loaded from the database, committing these objects can be slower than necessary due to the equality checks that have to be performed. Also, the state of the object is duplicated in memory, so this may cause memory scalability problems. Jaxor never suffers from these scalability problems. Objects are represented in memory once. If they are updated, or deleted, then the session is notified of the changed. No extra comparisons have to be done. " And here I come short - Can't find what to say in Hibernates defence here ? (How much "double state" does Hibernate need ?) Death to Duplication Well - this part is about generating code from metadata instead of manual keeping code in sync with metadata. Here Hibernate rock :) we got xdocbean2hbm and hbm2java and its constantly improving. Second part is about having a "Database synchronization tool to match mapping information to the database schema" about handling simple "deltas" to a schema and INFORMING about columns/tables that the metadata does NOT cover...(maybe we should start maturing schemaupdate and build a schemacomparison "tool" ?) Power of Text. "Gui's are often wonderful marketing tools, but awful development tools" - nuff said :) (and he continues " Even worse are gui's that don't work directly with text files" :) "If you are implementing a non-trivial (is there any other kind?) application, and someone attempts to sell you an O/R mapping tool that doesn't allow you to configure the mapping information with your favorite text editor, run away. "... well, here Hibernate is all about text :) Any comments ? :) /max --- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] collections (in one-to-many, many-to-one, etc..)
Ok - that surprises me a little :) I understand that if the collection instance is replaced then hibernate can not have any clue on what to do (or maybe it could load the existing relationship from the db, and do an compare ? Or is this to complex/heavy ?). But I had somewhat expected (silly me :) that if the collection was one of the hibernate'ones then hibernate would "trust" them to be "correct" and tracked. s = sf.createSession(); Cat c = new Cat("Morris"); p.getFriends().add(new Cat("Gustav")); Cat sabrina = new Cat("Sabrina") p.getFriends().add(sabrina); p.getFriends().add(new Cat("Bond")); s.save...(save of c and all its siblings) s.flush(); s.close(); p.getFriends().remove(sabrina); // I had expected that the hibernateSet here would track this removal s = sf.createSession(); // will this result in a delete of all cat-to-friends pairs in the many-to-many table ? // and afterwards result in insertion of the siblings left in the getFriends() set ? s.saveOrUpdate(p); s.flush(); s.close(); And if the friends relationship (many-to-many) would have been children instead (many-to-one), then Gustav, Sabrina and Bond's parent key woud have been nulled (via an update) and then afterwards Gustav and Bond's would be again updated, right ? Does this makes sense :) /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 18, 2003 11:36 PM Subject: Re: [Hibernate] collections (in one-to-many, many-to-one, etc..) > > Inside a Session, Hibernate keeps a snapshot of the original state > of a collection and so can do removals/additions individually. > > However, an object that came into the session via a call to update() > may have had all kind of things done to it (a PersistentCollection > completely replaced with a transient Collectin, for example). So we > can't really have been tracking changes. In this case Hibernate > simply removes all the existing rows using a single DELETE or > UPDATE and then recreates the whole collection, based upon the new > state of the object that was passed to update(). > > Think of update() as "trash whatever was there and use this instead". > OTOH, load() followed by flush() means "grab the existing state and > then carefully make any necessary adjustments". > > > > How does Hibernate decide/track how to delete, update, insert tuples based > > on what the user has added and/or removed in the sets/lists representing > > many-to-one and many-to-many mappings ? > > > > (the question just came to my mind when i saw: "P.S. Hibernate is *not* > > tracking which objects were removed from the collection (also a Good > > Thing)." - and I came to think: Ok, but then how does it decide to do a > > delete of something if it does not track deletions :) > > (I guess there are an simple and an more advanced explanation - I like them > > both :) > > > > > --- > This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will > allow you to extend the highest allowed 128 bit encryption to all your > clients even if they use browsers that are limited to 40 bit encryption. > Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] hibernate unittests not "compatible" with eclipse...
Ok - I understand the argument for not slowing down the testsbut I do not understand how you can run the tests from inside eclipse without errors :( I would like to find out about this...which version of eclipse are you using ? Im using Eclipse M4 and the latest integration build (but I don't think it matter much because I have always had this problem with hibernate unit test+eclipse) Are you running one test, multiple test or all tests from inside eclipse ? I would like to examine this so it would really help if you could send me your: .classpath .project And a copy of the launch config that you uses to run the tests ? (This is done by going into the the Run/Debug configuration dialog, choose the "Launch configuration" and look at the "Common" tab. Here you can choose "Shared" and save it outside the eclipse workspace. Please send the resulting file to me :) Thanx! /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 18, 2003 11:26 PM Subject: Re: [Hibernate] hibernate unittests not "compatible" with eclipse... > > I run the unit tests inside eclipse every day with no problems and > no particular special configuration. I don't want to have to > re-parse mappings before each test, as that would make it *much* > slower to run the tests. > > > > > --- > This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will > allow you to extend the highest allowed 128 bit encryption to all your > clients even if they use browsers that are limited to 40 bit encryption. > Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] DynaBean components
Ok - this sounds interesting :) I vaguely remember that someone tried to do this earlier for Hibernate, is this the thing that was done at that time ? I'm curious to what this stuff can be used ... you mention that one can better dynamically extend the schema, as you do not need to modify the classes, I dig that :) Any other Good Thing's about this one ? (One could argue that dynamically extending the schema is a Bad Thing - but I won't - not yet :) /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 19, 2003 1:04 PM Subject: [Hibernate] DynaBean components > I added support for DynaBean components to Hibernate2. You can now > use mappings like: > > > . > > > > > > > > > Can people please try this out, to check that I didn't get anything > wrong; I am new to DynaBeans, so I'm not sure I am using it right. > (Like all the Jakarta stuff it is completely underdocumented.) > > What I didn't find was a way to do the equivalent of Class.forName() > to retrieve a DynaClass. So Hibernate and the user code aren't > actually using the same DynaClass instance, which is suboptimal. > > > > > > > --- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] 2.0 beta 2
This last line "In Hibernate 2.0 beta 2, collections carry around a snapshot of their persistent state (even when serialized). So rows may now be managed individually even in the case of update().", I naively read as: "In Hibernate2 all the above "delete/insert instead of update" problems goes away" Is that true ? :) /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 02, 2003 10:20 AM Subject: [Hibernate] 2.0 beta 2 > 2.0 beta 2 fixes bugs in 2.0 beta 1 and adds: > > * efficient collection updates with Session.update() > * cache configuation in hibernate.cfg.xml (rather than the mapping documents) > * smarter alias generation for properties with long column names > > I also wrote up some stuff about collection performance that everyone > should read > > http://hibernate.bluemars.net/71.html > > this can be read in conjunction with the document I posted earlier > > http://hibernate.bluemars.net/69.html > > > peace > > Gavin > > > > > --- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Updated Logo
I liked the lowercase logo much better :) Could you not keep the different versions on the page so people can compare the differences ? /max - Original Message - From: "Christian Bauer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 04, 2003 5:24 PM Subject: [Hibernate] Updated Logo > I just updated the Logo/Design proposal page on the Wiki. > > -- > Christian Bauer > [EMAIL PROTECTED] > > > --- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] [Hibernate2] suggestion: introduce beforeSave into interceptor...
Would the time now be best for introducing an beforeSave/beforeFlush method to interceptor ? Why ? Just to have a way to directly set properties on the object instead of via an side-effect as it is done know in onSave/onFlush. Just a suggestion :) /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Suggestion: Encapsulate SQLException in HibernateException
Im changing my +0 vote to +1 after seeing the arguments and after having discussed it with my coworkers :) Reasons: 1. It simplifies the exception handling. (You only got one exception to catch) 2. Nested exceptions is becoming the defactor standard so no problems here 3. Hibernate can add semantic understanding to the exception. Bad things: 0. One developer said: I would like to know if the HibernateException actually originated from an SQLException...before you would know it directly, in the future you could just "traverse" the chains to the excpeiton to check the reason - so that is actually not a "bad thing" :) 1. It will break existing code and exception handling code.but if ones exception handling code is so hairy that they cannot survive this change it would be a good time to clean up anyway :) /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "Timothy Kettering" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, January 06, 2003 4:48 AM Subject: RE: [Hibernate] Suggestion: Encapsulate SQLException in HibernateException This is exactly the kind of input I was looking for :) And your point is quite correct; even if we *did* rationalize the Session interface to throw only HibernateExceptions, in general, we *still* wouldn't be able to do this: Session s = sf.openSession() try { // do some work } catch (HibernateException he) { // yada yada yada } finally { s.close(); } Why? because "yada yada yada" needs to happed no matter *what* kind of exception occurred (even RuntimeExceptions). However, there is another argument for this change, that no-one has really brought up. Nested exceptions let us add some contextual information to the wrapped SQLException. So the developer could see what Hibernate was doing when the SQLException occurred. At present you see a stack trace which is somewhat helpful but probably less helpful than what we could do with nesting. > This is just my two cents here, and I'm still relatively new to those > parts, but here goes: > > I've been doing development on database backed persistence stuff, and > after a brief unfullfilling fling with Castor, I ditched that > and went > with Hibernate and lets just say that this thing is a whole > lot better. > > But I digress. Regarding SQLExceptions, I wrap everything up in the > persistence layer with it's own exception, so theres just one > exception > to throw in the application when accessing the data, but in the > persitence class file and with Hibernate, I found myself having to > catch 4-5 different types of exceptions when doing a hibernate query, > and I eventually just gave up on that and just put them in a vanilla > Exception try-catch block and sort it out afterwards. > > I guess my point here is that in my case, I'm already catching it all > with Exception so it doesn't make much difference to me > because of all > the other exceptions I have to catch anyway compels me to use this. > But if the exceptions could be consolidated to just one or two types, > then i would see a benefit to catching them individually. > > I don't know how others do it, they may have a better > solution or know > better than I do. But you wanted feelings, man! :) > > -tim > > On Sunday, January 5, 2003, at 10:09 PM, Gavin King wrote: > > > Has this thread died? > > > > I still havn't got a really good feeling for what other > people think > > about this issue > > > >> -Original Message- > >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > >> Sent: Saturday, 4 January 2003 1:46 AM > >> To: [EMAIL PROTECTED] > >> Subject: [Hibernate] Suggestion: Encapsulate SQLException in > >> HibernateException > >> > >> > >> Hi, > >> > >> I was thinking about wrapping SQLException in > HibernateException, so > >> that we don't need to worry about catch HibernateException and > >> SQLException. Since now the work is focused on some changes for > >> Hibernate 2, this could be the right time to do this kind > of change. > >> This would simplify the error handling in the applications. > >> > >> Robson > >> > >> > >> > >> --- > >> This sf.net email is sponsored by:ThinkGeek > >> Welcome to geek heaven. > >> http://thinkgeek.com/sf > >> ___ > >> hibernate-devel mailing list [EMAIL PROTECTED] > >> https://lists.sourceforge.net/lists/listinfo/hibernate-devel > >> > > > > > > **
[Hibernate] interesting sql approach...
http://sourceforge.net/docman/display_doc.php?docid=14872&group_id=65066 Just for info :) /max --- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] CodeGenerator bug
Ok - I've found the exact problem. The hbm.xml file does not state a type for any of the property names in the SubDetail class - thus the codegenerator cannot give it any sensible class name (maybe we should just insert java.lang.Object or java.lang.String then ?) The codegenerator assumes there are at least ONE attribute on each persistent class, and in this case it sees none because of the above mentioned "error". I can easily fix the problem of an incomplete constructor, but it will only hide the true error - that you have not created a hbm.xml that can be codegenerated (except if we add a new feature to the codegenerator to insert af default java type for properties without a type?) /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 31, 2002 6:37 PM Subject: [Hibernate] CodeGenerator bug > This bug is still in the current codebase: > > public SubDetai) { > } > > I had been under the impression it was fixed already. I know someone > else knew what was going on there > > > > --- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Hibernate 2
> * Remove the exception that occurs if you save an object > that is already associated with the session. This > makes save() consistent with saveOrUpdate(). >Lets make this change. > * Remove the exception that occurs if you delete an object > that is already deleted in that session. >Lets make this change also (for consistency). Max, I don't see >much value in making this configurable. We don't want to spawn >millions of config properties for minor issues like these. ;( bummer The methods will still throw an exception if I delete/save the same entity with two different instances, or ? e.g. Person p1 = s1.load(Person.class, 42); Person p2 = s2.load(Person.class, 42); // P1 and P2 are same entity, but two different instances s1.delete(p1); s1.delete(p1); // will now not throw an exception s1.delete(p2); // would be nice if it blew (and the same for save()) That would ensure that I can still be "notified" if someone has "screwed" up their save/delete sequence... /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Suggestion: Encapsulate SQLException in HibernateException
Im approx +0 on this one :) Gavin, why was this done in the first place ? Seem to remember somewhere that the docs states: Free from my mind: "Hibernate does not hide what's happening. e.g. SQLExceptions is propagated all the way up to the user." . /max - Original Message - From: "One Ovthafew" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 5:29 PM Subject: Re: [Hibernate] Suggestion: Encapsulate SQLException in HibernateException > I am happy to introduce a JDBCException that wraps any SQLExceptions > that occur. However, I don't have a strong view either way. So lets just > vote on this > > Gavin > > >> I was thinking about wrapping SQLException in HibernateException, so > that we don't need to worry about catch HibernateException and > SQLException. Since now the work is focused on some changes for > Hibernate 2, this could be the right time to do this kind of change. > This would simplify the error handling in the applications. << > > - > Never lose a fax again, receive faxes to your personal email account! > Visit http://www.mbox.com.au/fax > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Hibern8IDE now part of hibernate-tools...
Still just in CVS, but you can get a binary archive at http://www.xam.dk/blog/?itemid=19 Enjoy ;) /max --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Road Map
>Hibernate 2.0 beta >== >* create a new module in CVS with improved directory > structure Yes! :) > * rename packages to net.sf.hibernate Yes! :) >* replace existing configuration mechanisms > with an interface that unifies the functionality > of HibernateService, (the misnamed) Datastore, > Hibernate.configure() and Configuration. Kewl - but not a big thing in my book...but it might be for purists :) >* query language enhancements, starting with: > - OUTER JOIN, FULL JOIN, etc > - AS instead of IN, IN CLASS I've been thinking about this outer join thingy - and I hope it is one of the first thing we can get implemented. I tried last night, but I do not have enough knowledge regarding the parser to do it in due time. The reason I like to have it is that OUTER JOIN's in the query language is very important for many applications, and that I can't find a workaround to this problem (except issuing two or more queries). ... > - select new Foo(bar.name, bar.count) from . This one is going to be fuun :) (You didn't follow up on the discussion on identity for these "value beans" - was it just to insane or ? :) >* JCA implementation Let's make this one as clean and simple as possible - no magic :) >* removal of support for toplevel collections / > subcollections Fine by me :) >Should 2.0 be 100% backward compatible with 1.2? Not necessarily :) >Because almost everything is defined by interfaces (and >because I don't envisage any change in semantics for >any operations of the core interfaces), we *could* >continue to support the existing interfaces alongside >the "new" net.sf.hibernate.* interfaces. I see no reason why we should keep around the old cirrus.hibernate package name I see three possibilities here: (1) make a clean break - most applications will be portable to 1.2 with nothing more than a few simple text search/ replace (s/cirrus.hibernate/net.sf.hibernate). This will mean less code to manage / distribute. (2) continue to support certain core interfaces: - Session - SessionFactory - UserType - Hibernate - Query - ScrollableResults - ??? What is the difference between 1 and 2 ? Are you going to change core names like Query, or is it the actual methods on the interface you are going to change ? Or is option 2 just about keeping the old cirrus.hibernate prefix for those interfaces ? Im at least +1 for (1)... Another suggestion for Hibernate 1.2 is to look into adding support for RowSet's - or at least provide enough information from the result of an query to implement an RowSet efficently. I think RowSet is much better, simpler and richer than just returning Collection of Object[] (and I now the "new Foo(name, otherstuff)" will help here - but still :) That was my 2 cents :) /max --- This SF.NET email is sponsored by: Order your Holiday Geek Presents Now! Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap, MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] CodeGenerator bug
Yes - it was the problem about creation of the minimal constructor in the codegen. Which hbm.xml are you running it on ? /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, October 31, 2002 6:37 PM Subject: [Hibernate] CodeGenerator bug > This bug is still in the current codebase: > > public SubDetai) { > } > > I had been under the impression it was fixed already. I know someone > else knew what was going on there > > > > --- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] mail-archive.com
Look at http://news.gmane.org/thread.php?group=gmane.comp.java.hibernate.devel (which also can be read through a newsreader ) /max - Original Message - From: "Raible, Matt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 08, 2003 4:39 PM Subject: [Hibernate] mail-archive.com > Are there any plans for getting a better (searchable) archive for this > mailing list? I really like the one at mail-archive - I know the XDoclet > team uses it. > > Matt > > > > --- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Fw: [Hibernate] Metadata, codegenerator et.al...
forgot to send it to the list instead of directly so here you go :) - Original Message - From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> To: "Gavin King" <[EMAIL PROTECTED]> Sent: Sunday, October 27, 2002 3:33 PM Subject: Re: [Hibernate] Metadata, codegenerator et.al... > > > Any suggestions on formats/semantics of it all ? (property and attribute > > are > > > dubious names in > > > this db context, so is custom-attribute a good tag-name/metadata name > for > > > it ?) > > > > How about > > So, we got a metadata to augment/describe the metadata - well, I suppose > that's the > way it is supposed to be :) > > > > I would love to contribute the above mentioned stuff, if I had a clear > > > vision on the existing parsing and building > > > of metadata info in Hibernateand currently it seems that Hibernate > > > CANNOT parse an hbm.xml without > > > having the related classes in its classpath ...and that is somewhat of > an > > > limitiation when it is a codegenerator that > > > is about to generate these classes :) > > > > Good point. > > > > > Anyone with a clear vision and understanding of hibernates hbm.xml > parsing > > > that can untangle that web of assumptions > > > in the hibernate core ? > > > > Okay, there are two levels of metadata. The "parsed" metadata, represented > > by the cirrus.hibernate.map package and the "compiled" metadata which is > > really just the internal state of the EntityPersisters. > > > > You have no chance of using the compiled metadata. On the other hand, it > > would be reasonably easy to remove any references to actual classes from > the > > cirrus.hibernate.map package which is used to represent the internal state > > of Datastore. If you could clean up that package a little bit, it would > > probably do what you want. Now, that package is definately not meant to be > > exposed to users, but you might be able to expose it to the toolset. > > I've tried to dig into the map package, but it seems there is waaay to many > places > the code tries to do a classForName to check if it can continue to do its > parsing - > and by waaay to many, I mean waaay to many for me to go changing the parse > semantics :( > > So, I'll try to "just" add the metadata tag stuff...that should be doable > without changing much > of the semantics, but it sure won't be as usable when the parser still > requires the classes to > be available ;( > > /max > --- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] CodeGenerator
> > Thus, I'll suggest (and also make a patch as I get to it) that it > > should be optional to have the dependency on commons-lang. > Optimal, we > > could generate a bare-boned toString method based on the > > attributes/properties know to the metadata. > > > > On second thought - I'll add an option to either have the > codegenerator use the methods provided by commons-lang OR not > do anything at all :) > > The "do nothing" option is for those who want to have either > a base or their own custom subclass for their classes (nicely > supported by my metaattribute patch :) >Yes, I'm happy to agree to that in the case of toString(). Yup!. >However, in the case of equals() and hashCode() for composite-id >classes, we actually *need* them. (Its required by Hibernate.) >I would much prefer the commons-lang dependency to trying to >fully generate the equals() and hashCode() methods (thats >actually *more* complicated). Yup! >And after this discussion, I'm leaning toward the view that >generated entity classes should implement equals() had hashCode() >consistent with identifier equality, though I suppose that should >also be optional. Yup! > > And what about the meta-attribute thingy ? (it is not that a big > > codechange compared to the recent commit :) (i'm just > pushing here :) > > How about adding the meta-attribute thingy as an extra X-mas > gift - it would instantly make me happy, and the > codegenerator so much more better :) >After this discussion I'm finally satisfied that this is a >requirement if CodeGenerator is to become really useful. So I'm >perfectly happy to allow things like: Ok - an even more powerfull meta, than my patch :) I'll start doing it right now :) > > JavaDoc comment for Foo > AbstractPersistent > FooBase Okey - I get this one(and those class references are meant to be fully qualified names, right ?) I'll even put in another one (the one that I currently need :) Validatable Auditable or should that be Validatable, Auditable > > > JavaDoc comment for getBar() > > java.lang.Object > > . But this one ? Isn't this a bit "cloudy" If I understand this correctly you want that if "java-type" is provided the codegenerator should use that type instead of the type specified in the propertyJust curious, when is that usefull ? > >The only bad thing about is its not very well self-documenting. >So we will really need a page of documentation about CodeGenerator. I'll be happy to do both :) >Particularly since it is now maturing quite nicely :) Yes - it is isn't :) /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] what's that fix ?
"fixed proxy deserialization"was there ever a problem ? /max --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] JBoss and Hibernate
This is expected behavior, snippet from the docs: hilo.long Uses a hi/lo algorithm to efficiently generate identifiers of type long, given a table and column (by default "hibernate_unique_key" and "next" respectively) as a source of hi values. The hi/lo algorithm generates identifiers that are unique only for a particular database. Do not use this generator with connections enlisted with JTA or with a user-supplied connection. Notice the last line :) Workaround: Make your own generator that makes a direct connection to do the same thing :) Maybe we should provide such a beast with hibernate ? /max - Original Message - From: "Simon Stewart" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, November 29, 2002 5:56 PM Subject: [Hibernate] JBoss and Hibernate > Using JBoss 3.0.4, the Apple OS X JDK 1.4DP6 and Postgres 7.2.2 it is > impossible to persist objects using Hibernate (beta4). When using code > similar to: > > Person p = new Person(); > Session sess = Hibernate.openSession(); > sess.save( p ); // Exception thrown here > // Close session properly. > > The following SQL exception is thrown: > > java.sql.SQLException: You cannot commit with autocommit set! > > This is ultimately caused by the HiLoGenerator while trying to set the > persisted object's ID. If I try the same sort of thing with a > Transaction: > > Person p = new Person(); > Session sess = Hibernate.openSession(); > Transaction tx = sess.beginTransaction(); > sess.save( p ); // Exception thrown here > tx.commit(); > // Close session properly > > The exception: > > java.sql.SQLException: You cannot commit during a managed transaction! > > is thrown. This is again caused by the HiLoGenerator. > > As I had not seen this behaviour under previous versions of JBoss, I > posted to the JBoss user list asking if anyone else had seen this > problem. David Jencks, one of the JBoss developers, replied that: > > "Autocommit on is required by the jca spec, and should have been the > case > for 3.0 versions as well. You should endevour to make the transactions > be > controlled by the jboss tm/jta/cmt etc." > > Which fits with my error messages because I obtain my datasource from > the JNDI (java:/DefaultDS, if that helps) The problem is that the > HiLoGenerator (which my classes use) commits the changes that it has > made to the underlying Hi/Lo table by calling Connection.commit() (line > 131 in HiLoGenerator.java, I think) rather than using a transaction, > which would work. Are there any known work-arounds to this problem > other than generating the IDs myself? Should I mark it as a bug on the > sourceforge pages? > > Regards, > > Simon > > > > --- > This SF.net email is sponsored by: Get the new Palm Tungsten T > handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Re: [Hibernate-commits] Hibernate/cirrus/hibernate/test FooBarTest.java,1.237,1.238 MultiTableTest.java,1.21,1.22
Just curious, what is different in IBM JVM since the tests did not run on it ? /max - Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 30, 2002 2:11 PM Subject: [Hibernate-commits] Hibernate/cirrus/hibernate/test FooBarTest.java,1.237,1.238 MultiTableTest.java,1.21,1.22 > Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test > In directory sc8-pr-cvs1:/tmp/cvs-serv14135/cirrus/hibernate/test > > Modified Files: > FooBarTest.java MultiTableTest.java > Log Message: > got tests working in IBM JVM > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] images on hibernte wiki ?
Hi! Im in the process of writing some thoughts about the tool suite for Hibernate. In this regard I have a set of nice little pictures that I wanna show you - anyone know how to include/embed them in the wiki pages on hibernate.sf.net ? /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Hooking into Hibernate classloader
> But this doesn't handle things like SessionFactory.getClassMetadata, > which takes a Class. Just asking out of personal interest :) why is everything in hibernate bound up onto Class objects, why not fully-qualifed-names in the form of strings instead ? That would make it more flexible and resistant to things that might not be availble on the classpath and e.g. make it possible to load internal mapping model and use it for codegeneration and other stuff which in its nature cannot rely on the classing being in the classpath. /max > Which leads me to believe that maybe it is better > to keep this all out of Hibernate and just say that it's up to the > application to wrap the Session, SessionFactory, and other public > interfaces appropriately. > > -Chris > > > > > --- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] wiki ... creating tables ?
Hi! Is it possible to create any form of tables in the wiki ? Can't seem to use standard wiki syntax ( | col 1 | col 2 | ) nor html table syntax ;( Im writing on the docs for hbm2java, and I need a table :) /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] wiki ... creating tables ?
bummer - guess i'll have to refresh my ascii-arts lessons :) /max - Original Message - From: "Christian Bauer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 04, 2003 6:03 PM Subject: Re: [Hibernate] wiki ... creating tables ? > On 04 Jan (16:14), Max Rydahl Andersen wrote: > > > Is it possible to create any form of tables in the wiki ? > > Can't seem to use standard wiki syntax ( | col 1 | col 2 | ) nor html table > > syntax ;( > > > > Im writing on the docs for hbm2java, and I need a table :) > > Sorry, there's currently no support for tables in coWiki. > > -- > Christian Bauer > [EMAIL PROTECTED] > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] [Hibernate2] tag in hbm2java
I've just submitted a patch for hbm2java (the codegenerator) are anyone willing to take it for a testdrive ? :) The newsworthy stuff can be seen at http://hibernate.bluemars.net/57.html Look at TestMeta.hbm.xml and the other hbm.xml files in the tool.test package for inspiration :) /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Hibernate vs. Castor example
> P.S. I'm not keen on the way you add items to bidirectional association. The > correct idiom is: > > parent.getChildren().add(child); file://yes, even if the children collection is > readonly="true" > child.setParent(parent); > sess.save(child); > > omitting the first line could cause bugs in more complicated circumstances. Hmm - isn't this idiom inefficient ? Doesn't parent.getChildren().add() (or any method on the collection) result in loading all the children ? If the only intention is to add the child to the parent shouldn't the child.setParent(parent) be enough ? And then if I wish to have the parent in a "correct" state then I just do a s.load(parent, parent.getId()) ? /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] CodeGenerator
> > > > > > JavaDoc comment for getBar() > > > > java.lang.Object > > > > . > > But this one ? Isn't this a bit "cloudy" > If I understand this correctly you want that if "java-type" > is provided the codegenerator should use that type instead of > the type specified in the propertyJust curious, when is > that usefull ? >For example: > >currently generates: >public java.sql.Date getDate(); >what if you wanted >public java.util.Date getDate(); hmm - ok, I see your point...will look into it... >Hey, I just thought of another that would be *very* useful: > >protected > >JavaDoc comment for getBar() > > >surprised I didn't think of that before I actually think about this before, but could not come to term with me in what the scope should mean... Its it the actual field, the getX() or the setX() that should be modified ? (The same actually goes for the "description" tag...) How about having "description-get", "description-set" and just "description" for the actual field ? (or should it be "description-field" And then similarily "scope-get", "scope-set" and "scope"/"scope-field" for the actual field ? Maybe "scope" and "description" should just apply for both set, get and field if nothing else is specified ? Any thoughts ? /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Tools road map
And I've added some replies there also :) (look for "- Max") /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "Max Rydahl Andersen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, December 31, 2002 7:09 AM Subject: RE: [Hibernate] Tools road map My comments are now added in /italics/ on the page itself... > -Original Message- > From: Max Rydahl Andersen [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 31 December 2002 7:16 AM > To: [EMAIL PROTECTED] > Subject: [Hibernate] Tools road map > > > I've been so "insane" to plot down a "road-map" for the Tools > in Hibernate...it actually turned out to include more than an > road-map... So please take a look at > http://hibernate.bluemars.net/52.html > > And please provide any comment you see fit :) > > /max > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > ** CAUTION - Disclaimer ** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS End of Disclaimer ** --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Enhancements to the Hibernate Xdoclet subtasks
Gavin, Did anything ever happen concerning moving the source into an src directory ? /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "Max Rydahl Andersen" <[EMAIL PROTECTED]> Cc: "hibernate list" <[EMAIL PROTECTED]> Sent: Friday, November 29, 2002 6:36 AM Subject: Re: [Hibernate] Enhancements to the Hibernate Xdoclet subtasks > Yeah sure. I will make a support request to SourceForge staff > > - Original Message - > From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> > To: "Gavin King" <[EMAIL PROTECTED]>; "Joel Rosi-Schwartz" > <[EMAIL PROTECTED]> > Cc: "hibernate list" <[EMAIL PROTECTED]> > Sent: Friday, November 29, 2002 1:25 AM > Subject: Re: [Hibernate] Enhancements to the Hibernate Xdoclet subtasks > > > > And know when we are on an related subject :) > > > > Could we soon be introducing a src directory instead of having cirrus in > the > > root of the project ? > > It would make life much easier for me and my eclipse :) > > > > /max > > > > - Original Message - > > From: "Gavin King" <[EMAIL PROTECTED]> > > To: "Joel Rosi-Schwartz" <[EMAIL PROTECTED]> > > Cc: "hibernate list" <[EMAIL PROTECTED]> > > Sent: Wednesday, November 27, 2002 3:54 PM > > Subject: Re: [Hibernate] Enhancements to the Hibernate Xdoclet subtasks > > > > > > > > > > I'm not too keen on adding .project + .classpath - my .classpath has > > > hardcoded pathnames to various JDBC drivers and it would be a real > hassle > > to > > > not accidently check those in each time. (hibernate.properties is bad > > > enough; up to version 1.91 already.) Anyway, I use Eclipse very smoothly > + > > > successfully without them there. Note that I use cygwin for CVS access > > > because I just hate the eclipse CVS client. > > > > > > > If this is not a problem, then I would also like an okay to add > Eclipse > > > > project support. It only adds two files, .classpath and .project, and > > > > these are not intrusive to anyone who is not using Eclipse. In fact if > > > > you wanted to give me commit on all of the modules, I would be happy > to > > > > set up and maintain Eclipse project support across the board. For > people > > > > using Eclispe this makes it *much* easier to pull code out of cvs and > be > > > > up and running immediately. > > > > > > > > > > > > > > > --- > > > This SF.net email is sponsored by: Get the new Palm Tungsten T > > > handheld. Power & Color in a compact size! > > > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > > > ___ > > > hibernate-devel mailing list > > > [EMAIL PROTECTED] > > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > > > > > > > > --- > > This SF.net email is sponsored by: Get the new Palm Tungsten T > > handheld. Power & Color in a compact size! > > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en > > ___ > > hibernate-devel mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > --- This SF.NET email is sponsored by: The Best Geek Holiday Gifts! Time is running out! Thinkgeek.com has the coolest gifts for your favorite geek. Let your fingers do the typing. Visit Now. T H I N K G E E K . C O Mhttp://www.thinkgeek.com/sf/ ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] hbm2java patch for generating find methods
This is already fixed in CVS - old news ;) Sorry that i did not bite on your posting earlier, but with approx. 150 mails per day regarding hibernate one or two will slip ;( /max [EMAIL PROTECTED] wrote: The following is in the patch. This patch is based on a question I posted earlier today (http://sourceforge.net/forum/forum.php?thread_id=912698&forum_id=128638), but got no bites on. I did have to change the build to work with hibernate-2.0.2 as the build.xml was looking for ../../hibernate-2.0/lib. I fixed two problems here. 1)Only findAll was getting generated, no matter how many finder-method's were defined at the property level. To fix this, I simply changed the value of MT_FINDERMETHOD from "finder" to "finder-method". 2)The wrong SQL or HQL was getting generated for the findAll() method. Basically, it had "from className in class package.className" and hibernate was complaining by something like: "unexpected token: in [from Organization in class net.sf.jameleon.jdo.Organization]". I took out the text "in class package.ClassName" for the findAll method generation code. I hope this helps. --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Codegen usertype curiosity :)
Hi! Just "stumbled" across this "bug"/"missing feature" in the codegenerator. If the user has defined its own UserType, e.g. DoubleStringType then the codegenerator actually naively assumes the property is of type DoubleStringType and not String[] (which is the case for exactly this situation). My suggestion for solving this is as follows: Have the codegenerator try to instantiate each type and check if they implements UserType. If it does, then call getReturnedClass() and use that as an typename instead. - Problems: The UserType then needs to be on the classpath when the codegenerator runs., it will "slow-down" the codegenerator and there has to be some additional logic to figure out how the returned type should be defined in the java file. - Good stuff: This will be more or less transparent for the user. I had thought of just use an tag (as Gavin has suggested in another context) that said it is actually this type, and not the type listed in the hbm.xml file that should be used - Problems: The hbm.xml file then contains unneccesary redundant information that has to be repeated every time the usertype is used. - Good stuff: It it is the simplest thing that could possibly work :) Thus I suggest: First add support for an extra metatag that overrules the actual type when the codegenerator renderes the code. (This can also be used in other situations) Secondly add the "fancy" UserType handling :) hmm - maybe I should just shut up and go implement it :) /max --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] hibernate unittests not "compatible" with eclipse...
Could anyone (Gavin?) please send me their eclipse configuration as mentioned in the below mail ? (im curious to find out why you can ever run unittests from inside eclipse without failures ...(as eclipse does NOT call the suite() method) /max - Original Message - From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 19, 2003 2:31 PM Subject: Re: [Hibernate] hibernate unittests not "compatible" with eclipse... > Ok - I understand the argument for not slowing down the testsbut I do > not understand how you can run the tests from inside eclipse without errors > :( > > I would like to find out about this...which version of eclipse are you using > ? > Im using Eclipse M4 and the latest integration build (but I don't think it > matter much because I have always had this problem with hibernate unit > test+eclipse) > > Are you running one test, multiple test or all tests from inside eclipse ? > > I would like to examine this so it would really help if you could send me > your: > > .classpath > .project > And a copy of the launch config that you uses to run the tests ? > (This is done by going into the the Run/Debug configuration dialog, choose > the "Launch configuration" and look at the "Common" tab. Here you can choose > "Shared" and save it outside the eclipse workspace. Please send the > resulting file to me :) > > Thanx! > > /max > > > - Original Message - > From: "Gavin King" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, January 18, 2003 11:26 PM > Subject: Re: [Hibernate] hibernate unittests not "compatible" with > eclipse... > > > > > > I run the unit tests inside eclipse every day with no problems and > > no particular special configuration. I don't want to have to > > re-parse mappings before each test, as that would make it *much* > > slower to run the tests. > > > > > > > > > > --- > > This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will > > allow you to extend the highest allowed 128 bit encryption to all your > > clients even if they use browsers that are limited to 40 bit encryption. > > Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en > > ___ > > hibernate-devel mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > > > --- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] diff on wiki ?
Hi! Is there any way to see what has changed on a certain page on the wiki ? It would be really nice since I often read the pages based on what "Recent site updates" contains, but I'll have to guess on which part of the contents that has changed - not very efficient reading :( Just hoping, /max --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Hibernate XDoclet Task
> > Anyway, using xdoclet for generating getters/setters > is an overkill. Roger :) > In Hibernate context follwing parts of xdoclet would > be usefull: > - java bean module -> generate your beaninfo > for hibernated classes ( in EJB scenario it has to be > tweaked for value/data objects -> stinks ). > This way you get instantly swing/webwork support I've long sought for an example where BeanInfo classes could be used for something usefull (and Visual Age is not one of them)... Do you have an example of this ? Is it some kind of databinding you are doing or ? > - generate smart remote proxies for hibernated > classes, for example something like home interfaces of > entities > - generate all the stuff that makes going to > datastore through session bean transparent... Is this reality now or "just thoughts" ? (I would really like to work with this one (and we are about to hit a point where the codegenerator and XDoclet module may possible overlap :) > > Yes - the work with XDoclet and the maturing of the > > CodeGenerator makes > > Hibernate's surrounding tools very worth while :) > > One can either go from source to descriptor or from > > descriptor to source > > depending on which scenario you got - and via > > XDocLet, CodeGenerator (and > > possible MiddleGen) we could same some very precious > > developer time :) > > There is another tool I would like to play with: > UML2EJB ( also from xdoclet neighbourhood ) - > get you .xmi and produce xdoclet-marked ejb sources. > Matthias asked me to write templates for hibernated > classes ( also xdoclet marked ) > What is that compared to e.g. http://sourceforge.net/projects/axgen (which our old OJB friends has support for ..) > regards, > > = > Konstantin Priblouda ( ko5tik )Freelance Software developer > < http://www.pribluda.de > < play java games -> http://www.yook.de > > < render charts online -> http://www.pribluda.de/povray/ > > > __ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Introduction of src...
Gavin, I've just discovered your introduction of src :) I like the tools naming, they make more sense now Just wanna know if it is "safe" to start developing/patching on hbm2java now, or do you have more tricks up your "sleefes" :) /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Glarch$$EnhancedByCGLIB$$3 (Repeative method name/signature) and deadlock!
Hi! While running FooBarTest on the latest code from cvs I get the following error (multiple times): java.lang.reflect.InvocationTargetException: java.lang.ClassFormatError: cirrus/hibernate/test/Glarch$$EnhancedByCGLIB$$3 (Repeative method name/signature) The complete stack trace is at the bottom. Furthermore I also seem to get a deadlock between the connection that has created all the tables ( in schemaexport) and the next tests that do some updates! Doesn't schemeexport close its connection ? (or at least release its locks?) /max ps. running MS SQL with the JTurbo driver. java.lang.reflect.InvocationTargetException: java.lang.ClassFormatError: cirrus/hibernate/test/Glarch$$EnhancedByCGLIB$$3 (Repeative method name/signature) at java.lang.ClassLoader.defineClass0(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:493) at java.lang.ClassLoader.defineClass(ClassLoader.java:428) at java.lang.reflect.Method.invoke(Native Method) at net.sf.cglib.proxy.Enhancer.enhance(Enhancer.java:245) at cirrus.hibernate.proxy.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.ja va:43) at cirrus.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1464) at cirrus.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1409) at cirrus.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:63) at cirrus.hibernate.type.EntityType.nullSafeGet(EntityType.java:118) at cirrus.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:132) at cirrus.hibernate.type.AbstractType.hydrate(AbstractType.java:65) at cirrus.hibernate.loader.Loader.hydrate(Loader.java:334) at cirrus.hibernate.loader.Loader.loadFromResultSet(Loader.java:284) at cirrus.hibernate.loader.Loader.doFind(Loader.java:136) at cirrus.hibernate.loader.Loader.find(Loader.java:471) at cirrus.hibernate.impl.SessionImpl.find(SessionImpl.java:1069) at cirrus.hibernate.impl.SessionImpl.find(SessionImpl.java:1047) at cirrus.hibernate.impl.SessionImpl.find(SessionImpl.java:1039) at cirrus.hibernate.test.FooBarTest.testFind(FooBarTest.java:580) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:166) at junit.framework.TestCase.runBare(TestCase.java:140) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:131) at junit.framework.TestSuite.runTest(TestSuite.java:173) at junit.framework.TestSuite.run(TestSuite.java:168) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu nner.java:360) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner. java:246) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner .java:146) rethrown as cirrus.hibernate.HibernateException: CGLIB Enhancement failed at cirrus.hibernate.proxy.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.ja va:59) at cirrus.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1464) at cirrus.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1409) at cirrus.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:63) at cirrus.hibernate.type.EntityType.nullSafeGet(EntityType.java:118) at cirrus.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:132) at cirrus.hibernate.type.AbstractType.hydrate(AbstractType.java:65) at cirrus.hibernate.loader.Loader.hydrate(Loader.java:334) at cirrus.hibernate.loader.Loader.loadFromResultSet(Loader.java:284) at cirrus.hibernate.loader.Loader.doFind(Loader.java:136) at cirrus.hibernate.loader.Loader.find(Loader.java:471) at cirrus.hibernate.impl.SessionImpl.find(SessionImpl.java:1069) at cirrus.hibernate.impl.SessionImpl.find(SessionImpl.java:1047) at cirrus.hibernate.impl.SessionImpl.find(SessionImpl.java:1039) at cirrus.hibernate.test.FooBarTest.testFind(FooBarTest.java:580) at java.lang.reflect.Method.invoke(Native Method) at junit.framework.TestCase.runTest(TestCase.java:166) at junit.framework.TestCase.runBare(TestCase.java:140) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:131) at junit.framework.TestSuite.runTest(TestSuite.java:173) at junit.framework.TestSuite.run(TestSuite.java:168) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu nner.java:360) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner. java:246) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner .java:146) --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?p
[Hibernate] Session local interface...
Hi! Just wondering if anyone have discovered that I uploaded a small patch for having Session local interceptors. I think it is worthwile having the option of session local interceptors, otherwise one would have to go through loops to support session-specific interceptors. /max --- This sf.net email is sponsored by: Access Your PC Securely with GoToMyPC. Try Free Now https://www.gotomypc.com/s/OSND/DD ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] tabs?
Hi Gavin :) "beautiful, shiny, happy TABS!" - are you on drugs or something :) Just wanted to know if I have to enable "Use tabs for indention" in my editors from now on when im editing hibernate ? (I thought TABS was considered harmfull in code on the same level as GOTO's are :) /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Changelog correction :)
Hi! Just to be nitty-gritty... My name is: Max Andersen, not Max Anderson as it is stated in the changelog. Anderson is a Swedish/Norwegian name, and Andersen is a Danish name - and i'm a Dane :) /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] question about dialects..
While loading hibernate2 into a clean eclipse workspace I spotted that all dialects implement an deprecated method in Dialect: /** * The syntax used to add a column to a table. * @deprecated not supported on many platforms * @return String */ public abstract String getAddColumnString(); Why is this deprecated just because not so many platforms support it ? (just wondering, coz' I would just assume dialects not supporting this would throw an UnsupportedOperation exception et.al.) /max --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Glarch$$EnhancedByCGLIB$$3 (Repeative method name/signature) and deadlock!
ok - it was also the next panic attempt I was about to take :) /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "Max Rydahl Andersen" <[EMAIL PROTECTED]> Cc: "hibernate list" <[EMAIL PROTECTED]> Sent: Saturday, November 02, 2002 11:46 PM Subject: Re: [Hibernate] Glarch$$EnhancedByCGLIB$$3 (Repeative method name/signature) and deadlock! > Ah. You need to grab the latest cglib.jar. I will add it to CVS now. > > - Original Message - > From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Sunday, November 03, 2002 9:33 AM > Subject: [Hibernate] Glarch$$EnhancedByCGLIB$$3 (Repeative method > name/signature) and deadlock! > > > > Hi! > > > > While running FooBarTest on the latest code from cvs I get the following > > error (multiple times): > > java.lang.reflect.InvocationTargetException: java.lang.ClassFormatError: > > cirrus/hibernate/test/Glarch$$EnhancedByCGLIB$$3 (Repeative method > > name/signature) > > > > The complete stack trace is at the bottom. > > > > Furthermore I also seem to get a deadlock between the connection that has > > created all the tables ( in schemaexport) and the next tests that do some > > updates! > > Doesn't schemeexport close its connection ? (or at least release its > locks?) > > > > /max > > > > > > ps. running MS SQL with the JTurbo driver. > > > > > > java.lang.reflect.InvocationTargetException: java.lang.ClassFormatError: > > cirrus/hibernate/test/Glarch$$EnhancedByCGLIB$$3 (Repeative method > > name/signature) > > at java.lang.ClassLoader.defineClass0(Native Method) > > at java.lang.ClassLoader.defineClass(ClassLoader.java:493) > > at java.lang.ClassLoader.defineClass(ClassLoader.java:428) > > at java.lang.reflect.Method.invoke(Native Method) > > at net.sf.cglib.proxy.Enhancer.enhance(Enhancer.java:245) > > at > > > cirrus.hibernate.proxy.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.ja > > va:43) > > at cirrus.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1464) > > at cirrus.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1409) > > at > > > cirrus.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:63) > > at cirrus.hibernate.type.EntityType.nullSafeGet(EntityType.java:118) > > at > cirrus.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:132) > > at cirrus.hibernate.type.AbstractType.hydrate(AbstractType.java:65) > > at cirrus.hibernate.loader.Loader.hydrate(Loader.java:334) > > at cirrus.hibernate.loader.Loader.loadFromResultSet(Loader.java:284) > > at cirrus.hibernate.loader.Loader.doFind(Loader.java:136) > > at cirrus.hibernate.loader.Loader.find(Loader.java:471) > > at cirrus.hibernate.impl.SessionImpl.find(SessionImpl.java:1069) > > at cirrus.hibernate.impl.SessionImpl.find(SessionImpl.java:1047) > > at cirrus.hibernate.impl.SessionImpl.find(SessionImpl.java:1039) > > at cirrus.hibernate.test.FooBarTest.testFind(FooBarTest.java:580) > > at java.lang.reflect.Method.invoke(Native Method) > > at junit.framework.TestCase.runTest(TestCase.java:166) > > at junit.framework.TestCase.runBare(TestCase.java:140) > > at junit.framework.TestResult$1.protect(TestResult.java:106) > > at junit.framework.TestResult.runProtected(TestResult.java:124) > > at junit.framework.TestResult.run(TestResult.java:109) > > at junit.framework.TestCase.run(TestCase.java:131) > > at junit.framework.TestSuite.runTest(TestSuite.java:173) > > at junit.framework.TestSuite.run(TestSuite.java:168) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu > > nner.java:360) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner. > > java:246) > > at > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner > > .java:146) > > rethrown as cirrus.hibernate.HibernateException: CGLIB Enhancement failed > > at > > > cirrus.hibernate.proxy.CGLIBLazyInitializer.getProxy(CGLIBLazyInitializer.ja > > va:59) > > at cirrus.hibernate.impl.SessionImpl.doLoadByClass(SessionImpl.java:1464) > > at cirrus.hibernate.impl.SessionImpl.internalLoad(SessionImpl.java:1409) > > at > > > cirrus.hibernate.type.ManyToOneType.resolveIdentifier(ManyToOneType.java:63) > > at cirrus.hibernate.type.EntityType.nullSafeGet(EntityType.java:118) > > at > cirrus.hibernate.type.ComponentType.nul
[Hibernate] collections (in one-to-many, many-to-one, etc..)
Hi! Just need some thing explained :) How does Hibernate decide/track how to delete, update, insert tuples based on what the user has added and/or removed in the sets/lists representing many-to-one and many-to-many mappings ? (the question just came to my mind when i saw: "P.S. Hibernate is *not* tracking which objects were removed from the collection (also a Good Thing)." - and I came to think: Ok, but then how does it decide to do a delete of something if it does not track deletions :) (I guess there are an simple and an more advanced explanation - I like them both :) /max --- This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Re: [Hibernate-commits] Hibernate/cirrus/hibernate/test FooBarTest.java,1.237,1.238 MultiTableTest.java,1.21,1.22
That's a mean one :) I'll remember that when my reflective code starts trashing on IBM's :) /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "Max Rydahl Andersen" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, December 31, 2002 12:37 AM Subject: RE: [Hibernate] Re: [Hibernate-commits] Hibernate/cirrus/hibernate/test FooBarTest.java,1.237,1.238 MultiTableTest.java,1.21,1.22 IBM JVM returns reflected methods in the reverse order. So if some test deosn't clean up after itself, it might fail on one JVM but not the other :) > -Original Message- > From: Max Rydahl Andersen [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 31 December 2002 12:16 AM > To: [EMAIL PROTECTED] > Subject: [Hibernate] Re: [Hibernate-commits] > Hibernate/cirrus/hibernate/test FooBarTest.java,1.237,1.238 > MultiTableTest.java,1.21,1.22 > > > Just curious, what is different in IBM JVM since the tests > did not run on it ? > > /max > > - Original Message - > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, December 30, 2002 2:11 PM > Subject: [Hibernate-commits] Hibernate/cirrus/hibernate/test > FooBarTest.java,1.237,1.238 MultiTableTest.java,1.21,1.22 > > > > Update of /cvsroot/hibernate/Hibernate/cirrus/hibernate/test > > In directory sc8-pr-cvs1:/tmp/cvs-serv14135/cirrus/hibernate/test > > > > Modified Files: > > FooBarTest.java MultiTableTest.java > > Log Message: > > got tests working in IBM JVM > > > > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > ** CAUTION - Disclaimer ** This message may contain privileged and confidential information. If you are not the intended recipient of this message (or responsible for delivery of the message to such person) you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. If you have received this message in error, you should destroy it and kindly notify the sender by reply e-mail. Please advise immediately if you or your employer do not consent to Internet e-mail for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of Expert Information Services Pty Ltd ("The Company") shall be understood as neither given nor endorsed by it. The Company advises that this e-mail and any attached files should be scanned to detect viruses. The Company accepts no liability for loss or damage (whether caused by negligence or not) resulting from the use of any attached files. **EIS End of Disclaimer ** --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Moving Hibernate objects with SOAP
Hi! To me it also sounds a bit better to have a Axis serializer (if such an abstraction do exist) do the job. Having hbm2java generate special DTO's for you to this purpuse is also ok, but remember that these DTO's cannot be used by hibernate as it requires you to use the Collection interface types (list, map, bag, etc.) But thinking about it makes also wonder why Axis can't handle untyped lists ?! Can it only handle concrete arrays, or ? Best explanation is probably to show me an example of a POJO and the corresponding Axis compatible soap thingy - could you do that ? /max Dmitri Colebatch wrote: Hey, I haven't done this, nor needed to give it any thought before, but would it be possible to write an Axis serializer that utilized the hibernate codebase, specifically the meta-data about the classes, to serialize them to soap friendly collections and so on? I'm assuming you're not trying to distribute transactions or anything? You're just after the value yeah? my 2c. cheers dim - Original Message - From: "Josh Rehman" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 07, 2003 11:45 AM Subject: [Hibernate] Moving Hibernate objects with SOAP Hello all, I'd like to move Hibernate generated objects (generated with hbm2java, of course) across the wire with SOAP. There are two problems: First, Hibernate generates collection accessors. This is great, but these are, by necessity, untyped. The Axis serializer cannot handle this. Second, it often comes to pass that we are only interested in a subset of the object. In particular, we often do NOT want to move an entire collection accross the wire. Unfortunately, the serializer will call all accesors on the hibernate object, and CGLIB will, of course, do it's job and get everything known about that object. We have so far tried to solve these problems by writing an additional code generator that creates so-called "Data Transfer Objects" (Fowler's term, also abreviated DTO) that have a) typed array accessors, and b) the ability to specify a subset of interesting properties. We aren't quite done with this effort, but it's so far working out well. The DTOs are generated by delegating work to an underlying hibernate class. Has anyone faced and solved, these probelms? If so, I'd like to hear about it. In particular, I was hoping that there is something obvious that I may have missed. With kind regards, Josh Rehman --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: Bi-directional relationships (was Re: [Hibernate] Are toplevel collections / subcollections a Bad Thing?)
Should we implement this paradigm in the codegenerator ? (of course as an option) Maybe something like this: Where the codegen would generate something like the code below if "CodeGen.genCompositeGetSet" is set for the property and/or relationship. /max - Original Message - From: "Christian Bauer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 19, 2002 10:31 AM Subject: Re: Bi-directional relationships (was Re: [Hibernate] Are toplevel collections / subcollections a Bad Thing?) > On 19 Dec (09:20), Jim Downing wrote: > > > Thanks - I'd used the advance in Tom's manual to do the mapping, but I > > was trying to maintain the relationship in my persistent objects > > (rather than making the client do it, as in the FAQ), which was > > probably the cause of my problems. > > Thats exactly what I'm doing: > > class Child { > > public setParent(Parent newParent) { > > // Remove myself from old Parent > if (this.parent != null) { > this.parent.getChildren().remove(this); > } > > // Add to new Parent > newParent.getChildren().add(this); > > // Set new Parent > this.parent = newParent; > } > } > > This is similar to the Composite Pattern (or better, a part of it): > > http://www.idg.net/english/crd_composite_948016.html > > -- > Christian Bauer > [EMAIL PROTECTED] > > > --- > This SF.NET email is sponsored by: Geek Gift Procrastinating? > Get the perfect geek gift now! Before the Holidays pass you by. > T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This SF.NET email is sponsored by: Geek Gift Procrastinating? Get the perfect geek gift now! Before the Holidays pass you by. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Suggestion: move cirrus into a src directory
Hi! I was just wondering why you have placed the .java files package directory structure in the root of the Hibernate directory. Why not have a seperate src directory for it ? The current setup confuses e.g. eclipse especically if you build hibernate via ant - then it starts to see the build directory as a set of classes too :) /max --- This sf.net email is sponsored by: viaVerio will pay you up to $1,000 for every account that you consolidate with us. http://ad.doubleclick.net/clk;4749864;7604308;v? http://www.viaverio.com/consolidator/osdn.cfm ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Fw: [Hibernate] Road Map
whoops - forgot to correct the reply address so here it goes again :) - Original Message - From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> To: "Gavin King" <[EMAIL PROTECTED]> Sent: Sunday, December 22, 2002 6:24 PM Subject: Re: [Hibernate] Road Map > >>This one is going to be fuun :) (You didn't follow up on the discussion > >> on identity for these "value beans" - was it just to insane or ? :) > > >I think we need to maintain a strict distinction between "value types" > >and "entity types". These value beans shouldn't have any notion of > >identity because they are of value type. > > I agree this will be the most often used scenario. > > >Besides, you can probably do almost everything you need by simply > >using a "select distinct". > > Probably yes, but not if I have more than one column selected. > e.g. select distinct new LightPatient(p.id, p.name, p.lastname, p.city), new > Doctor(d.accountid, d.name, d.speciality, d.address) from > > Here the LightPatient's will probably be unique, but the Doctor could be > repeated. > > I could ofcourse do a second processing of the resulting object array, but > still - it would be a more strong > and flexible solution to do something like this: > > select distinct new LightPatient(p.id, p.name, p.lastname, p.city), new > Doctor(ID(d.accountid), d.name, d.speciality, d.address) > from > > But again - let us just start having Hibernate being able to create > valuebeans for us "on-the-fly" :) > > How about the "creating by constructor" vs. "creating and then set by > properties" approach ? > I think "creating and then set by properties" is the best in respect to > ensure that the value beans are initialized with the right > values because the propertynames are explicit listed opposed to "creating by > constructor" where it is the correct sequence and position of the properties > that "decides" how the valuebean is created. > But then again "creating by constructor" has a lean, mean and compact (read: > I like it) syntax, it requires only one constructor call (by properties > requires addtional N setters) and it is probably also the easiest to > implement. > > > > Or > > >is option 2 just about keeping the old cirrus.hibernate > >> prefix for those interfaces ? > > >I mean its possible to simultaneously have > > >cirrus.hibernate.Query > >net.sf.hibernate.Query > > >with the underlying implementation being > > >net.sf.hibernate.impl.QueryImpl > > Okey - then I'm all for #1. It is waste of good bandwith to manage those > seperate interfaces :) > > >> Another suggestion for Hibernate 1.2 is to look into adding > >> support for RowSet's - or at least provide enough information > >> from the result of an query to implement an RowSet > >> efficently. I think RowSet is much better, simpler and richer > >> than just returning Collection of Object[] (and I now > >> the "new Foo(name, otherstuff)" will help here - but still :) > > >Can you enlarge on what exactly you envisage RowSet support > >would look like? I must admit I don't really find the whole > >RowSet notion particularly compelling to begin with and I > >certainly don't know how it would work out in the context > >of OR mapping where the underlying data model is *much* more > >complex than a table of simple values. Perhaps you could > >give an example of code that uses a RowSet in an O/R mapping > >context and some hints as to the semantics of something like > >CachedRowSet. > > My primary reason is just being able to provide a uniform "view" onto the > scalar queries, for which an RowSet is > a well known interface for accessing tabular data (and scalar queries - or > any query in Hibernate also "just" result in a tabular result, e.g. a List > of Object[]). > > Thus the first attempt on RowSet would not be to support all the > write-back/through possibilities of an RowSet (which I think you are > referring to by mentioning CachedRowSet), but simply to be able to provide > an interface onto the tabular data that provides something like this: > > RowSet rs = session.createRowSet(); // returns an sf.net.hibernate.RowSet, > which hold a reference to the session > rs.setCommand("select distinct new LightPatient(p.id, p.name, p.lastname, > p.age), doc from Patient as p, Doctor as doc where ..."); > > ResultSetMetaData rsmd = rs.getMetaData(); // nice to have to provide >
Re: [Hibernate] Road Map
That has been discussed, but under the name "Fetch profiles". And always with a positive attitude :) So, yes - its a good idea, and patches are welcome :) /max - Original Message - From: "Ara Abrahamian" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 22, 2002 7:29 PM Subject: RE: [Hibernate] Road Map > Btw while we're talking about eager loading or lazy loading things... > how do you find the idea of providing a dynamic mechanism to specify at > runtime for each scenario which parts should be loaded eagerly or > lazily? I mean a simple LoadPolicy object passed to the session.load() > method. Specifying lazy-load/blabla in the xml file is a very static and > inflexible approach for different use cases. > > Ara. > > > -Original Message- > > From: [EMAIL PROTECTED] > [mailto:hibernate-devel- > > [EMAIL PROTECTED] On Behalf Of Christian Bauer > > Sent: Sunday, December 22, 2002 3:46 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [Hibernate] Road Map > > > > On 22 Dec (10:44), Gavin King wrote: > > > > > I agree with this. It is the resposibility of the middle tier > > > to fetch data. If it did not fulfil its part of the contract, > > > we can't just have the web tier suddenly open connections to > > > the database. That has all *kinds* of security implications. > > > > > > > I can't see any other decent way - the View layer should not > > > > just assume it got the whole object model available to it... > > > > BTW, using a ThreadLocal is OK in a three tier setup, thanks Gavin for > > the pointer. > > > > I'm not talking about opening "direct connections" to the database, > but > > I think we all agree, that if the View gets an Object from the > Business > > Facade, all properties of this object should be visible and available > to > > the View. They wouldn't be if the Hibernate Session is closed and lazy > > collections are not initialized. Initializing the Collections in the > > Business Layer would either mean: > > > > a) Initializing all lazy loaded Collections in the Business Layer or > DAO > > with Hibernate.initialize() and serve them with their objects in the > > usual methods, e.g. "getEmployerByOID()" would return the requested > > Employer and all of its Employees already initialized, everytime. > > Somehow, Lazy Loading doesn't make any sense at all. > > > > b) Only load the lazy Collections when either a switch is triggered in > > the Business Facade method "getEmployerByOID(boolean initAll)" or > > another special method is called "getEmployerByOIDInitAll()". > > > > Is there a c)? > > > > I'm happy now with the ThreadLocal and a cleanup process at the end of > > the requeast and just assume, that when I get an Employer from my > > Business Facade, I can access all its properties. > > > > Custom Data Transfer Objects and Data Transfer Maps would somehat > remedy > > this problem, but I don't like these patterns when using POJOs instead > > of Entity Beans. > > > > -- > > Christian Bauer > > [EMAIL PROTECTED] > > > > > > --- > > This SF.NET email is sponsored by: Order your Holiday Geek Presents > Now! > > Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated > Soap, > > MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty. > > T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ > > ___ > > hibernate-devel mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] Codegen questions :)
Hi! Im in the process of generating the add and remove methods for bidirectional associations and got "problems"..eh..challenges :) The problem is: How do I identify bidirectional associations ? Hibernate's hbm.xml does not distinguish wether an association is uni- or bi-directional (and that is good - it makes thing simpler for the OR-mapping) But which logic should the codegenerator apply to 100% safely recognize if there is a need for an add/remove method - and how should it 100% safely recognize the type of arguments that should be for the add/remove methods ? (I got my own guess'es, but would like to hear you version as i'm not sure my guess covers all the situations where it can occur...) With hope for feedback :) /max --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] How to contribute a custom type ?
the JIRA ... look at hibernate.sf.net JIRA issue tracking Dhananjay Nene wrote: Hello, I have been working with a lot of polymorphic associations using a table-per- concreteclass strategy. This has led me to create a custom type which helps in mapping an "integer" into a class type for use with the "" relationship. Given many such relationships, I have created a abstract CustomType using which one can create a customType quickly for each table hierarchy. I am not sure how many developers use such relationships but I believe this abstract custom type would be a useful addition and would like to contribute that back to hibernate (with the necessary documentation of course :) ) How and where do I submit such code back ? Dhananjay --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] CodeGenerator
>The generated classes now have a dependency upon >commons-lang, which doesn't bother me in the >slightest, but other people may have another >opinion. Yes - me for one :) I would like to keep the generated code as simple as possible :) (but at the same time I like to broaden the usage of commons-lang) Thus, I'll suggest (and also make a patch as I get to it) that it should be optional to have the dependency on commons-lang. Optimal, we could generate a bare-boned toString method based on the attributes/properties know to the metadata. >The last thing I noticed, but didn't have time >to fix, is that subclass constructors are unaware >of superclass properties. We need to fix that >as soon as possible. If anyone has a chance to >address this, I would appreciate it. I'll look into it. >1.2.1 should be released before the weekend. And what about the meta-attribute thingy ? (it is not that a big codechange compared to the recent commit :) (i'm just pushing here :) /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Why this line...
Ok. As described shortly in my last email concerning this matter I had a configuraiton where the Class could not be found neither via the lookup or by comparing isAssignable - even though it was a Class with the same name. The problem was that it was loaded by another classloader (this can happen when lurking around with J2EE and servlet containers) and then the query would never get any results and return null! Maybe we could add a check before the result is returned wether it is null or not - and then throw an IllegalStateException or similar - warning that something truly bizar is happening ? /max - Original Message - From: "Gavin King" <[EMAIL PROTECTED]> To: "Max Rydahl Andersen" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, October 29, 2002 6:22 PM Subject: Re: [Hibernate] Why this line... > This is part of a preprocessing phase where we scan the query for Java > classes that *aren't* mapped in the mapping document and turn the single > query into n queries against the n implementors of that interface. So that > method says: if the passed token is the class name of an unmapped class, > return the names of all the implementors of that class. Otherwise return > null, and ignore the token. > > > - Original Message - > From: "Max Rydahl Andersen" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, October 29, 2002 3:16 AM > Subject: [Hibernate] Why this line... > > > > In SessionFactoryImpl I found this code: > > > > public String[] getImplementors(Class clazz) { > > > > if ( classPersisters.containsKey(clazz) ) return null; > > > > ... > > > > .. > > > > } > > > > > > > > Why should getImplementors return null if clazz is inside the > > classPersisters ? > > > > > > > > /max > > > > > > > > > > --- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > ___ > > hibernate-devel mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] darn...(and a codegenerator patch)
Here I sit with a patch for the codegenerator and know sourceforge is down for maintanence - bummer! Well, you get it here as an attachment instead then, so I can go happily to bed :) Yappering starts here: This patch solves the problems regarding the subclass not knowing about the supers fields. It does now. This patch both cleans up some parts of the codegen, but also makes it obvious that it could be even cleaner :) I suggest we just use this patch for 1.2.1 (it its better than the current one), and when we (read: Gavin) decides to integrate the metattribute patch (or not) - Then I'll do some major cleaning up in the codegenerator. (note to Gavin, if you accept the idea about metaattribute's then do not apply my earlier posted metaattriubte patch! I'll like to do the refactoring and metaattribute in one go ...and besides the old patch will not work without some work when this one gets applied :) Changes made: Made some small (non-vital) changes to the codegen test.hbm.xml files to make them more test friendly (e.g. all classes will know end in codegen.test instead of default package as some did before) Removed the adding of the implementing class name for collections as the codegenerator does not generate code that refer to this class (It is only used in the initialisation field of Field - and this field is never accessed from the BasicRender (or anywhere else that matters)) (Primarily done to avoid being told by Eclipse that I have unused imports in my code :) Refactored constructor generation so it is (much) cleaner and simpler (Primarily done to make it easier to add support for superclasses fields in constructors of subclasses) Discovered "bug" regarding the constructor arguments referencing to the concrete types instead of their proxy/interface. Came to think: Is the current behavior correct ? Should get/sets method for e.g. User use the interface IUser or the concrete User ? While refactoring it became obvious that the class ClassName and its usage could need another good old refactoring - but that i'll do later. codegencons.patch Description: Binary data
Re: [Hibernate] Anyone up yet another philosophical comparison :)
> > Was I a little harsh on this guy? Sorry ;) > > Just got your last point, cos it's only fair to point out that if this > is a Martin Fowler backed project, the chances are that this has been > developed in an "Extreme" manner, and probably has the easy support of > extreme programming in mind as one of the (unstated) aims of the code. > As a result, yes, he does live in a theoretical world where developers > manage ... databases. :) Just to be sure I ain't misunderstanding this Do you mean that is an theoritical world where developers manage databases ? (Because then i'm quite sure I live in a theoritical world, because Im a developer and I do manage database (and many of my co-developers does it to - simply to keep the db and programs world in its best shape and sync) /max --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] CodeGenerator
> >The generated classes now have a dependency upon > >commons-lang, which doesn't bother me in the > >slightest, but other people may have another > >opinion. > > Yes - me for one :) I would like to keep the generated code > as simple as possible :) (but at the same time I like to broaden > the usage of commons-lang) > > Thus, I'll suggest (and also make a patch as I get to it) that > it should be optional to have the dependency on commons-lang. > Optimal, we could generate a bare-boned toString method based > on the attributes/properties know to the metadata. > On second thought - I'll add an option to either have the codegenerator use the methods provided by commons-lang OR not do anything at all :) The "do nothing" option is for those who want to have either a base or their own custom subclass for their classes (nicely supported by my metaattribute patch :) > >The last thing I noticed, but didn't have time > >to fix, is that subclass constructors are unaware > >of superclass properties. We need to fix that > >as soon as possible. If anyone has a chance to > >address this, I would appreciate it. > > I'll look into it. This one is more "challenging" than I thought - will take some fiddling and refactoring to do it properlyworking on it (and also on making the codegen test hbm.xml files more complete/test-friendly) > And what about the meta-attribute thingy ? (it is not that a big > codechange compared to the recent commit :) (i'm just pushing here :) How about adding the meta-attribute thingy as an extra X-mas gift - it would instantly make me happy, and the codegenerator so much more better :) /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
[Hibernate] hbm2java in Hibernate 2...
How much back-wards compability should there be for hibernate-1.1 dtd in hbm2java ? (Here thinking on the recent 'role to name' name change)... Just wanting to hear the general opinion ? (Im +1 on having hbm2java only support hibernate-2.0.dtd) /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] CodeGenerator
> Is it recommended that all hibernate persistent classes implement > equals() and hashcode()? It is always recommende to implement equals and hashCode for any class that you would consider putting into java collections or other mechanisms that tries to identity and/or sort themso yes, it is recommende for all persistent classes (hibernate or no hibernate :) > If so, is it possible to implement them in a > base class? Yes - that is possible, but the current codegenerator (and Hibernate by design) refrain from forcing you to have an baseclass for your persistent classes. I've committed a patch (my so called metaattribute patch) that would allow the codegenerator to seamingsly (and more easily) support such constructs as common baseclasses and other fancy stuff (which should not be required by the "basic" codegeneration) > I'm doing this write now with the following toString() > method and it works pretty well: > > public String toString() { > StringBuffer results = new StringBuffer(); > Class clazz = getClass(); > > results.append(getClass().getName() + "\n"); > > Field[] fields = clazz.getDeclaredFields(); > > try { > AccessibleObject.setAccessible(fields, true); > > for (int i = 0; i < fields.length; i++) { > results.append("\t" + fields[i].getName() + "=" + >fields[i].get(this) + "\n"); > } > } catch (Exception e) { > // ignored! > } > > return results.toString(); > } This is more or less what commons-lang's reflectionToString does (which is what Gavin's patch will make the CodeGenerator do now) But what about your hashCode ? /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Hibern8IDE now part of hibernate-tools...
...and if you use the one in the cvs you will get a HQL history function too ;) /max [EMAIL PROTECTED] wrote: Fantastic.. I love using it to test my queries, and running it from inside of Eclipse is easy and great.. I will try out the new version! Does the new version allow you to copy and paste queries into it from externally? Eric Pugh -Original Message- From: Max Rydahl Andersen To: [EMAIL PROTECTED] Sent: 8/5/03 3:55 PM Subject: [Hibernate] Hibern8IDE now part of hibernate-tools... Still just in CVS, but you can get a binary archive at http://www.xam.dk/blog/?itemid=19 Enjoy ;) /max --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01 /01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] CodeGenerator
Best and easiest advice is: Use commons-lang ;) http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/builder/H ashCodeBuilder.html and http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/builder/T oStringBuilder.html Regarding hashCode write your own following the guidelines written here: (which is what commons-lang has done) http://java.sun.com/docs/books/effective/chapters.html (Read Chapter 3) /max - Original Message - From: "Matt Raible" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 29, 2002 4:47 PM Subject: RE: [Hibernate] CodeGenerator > > > > > This is more or less what commons-lang's reflectionToString > > does (which is what Gavin's patch will make the CodeGenerator do now) > > > > But what about your hashCode ? > > > > /max > > > > I'm looking for advice on how to implement an equals() and hashCode() > method in my base class. Any suggestions are appreciated. > > Thanks, > > Matt > > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] saveOrUpdate()
> Since I seem to be spending *so* much time with problems relating > to saveOrUpdate() functionality, I decided to provide some new > functionality. > > The Hibernate2 interceptor interface now has a > > Boolean isUnsaved(Object) > > method, so that the application can use something completely > different to unsaved-value, if it wants. > > > comments? APPLAUSE!:) I like it :), but how about an complementray functionallity that allows one to use any property to mark the object as unsaved ? (unsaved is not use for dirty checks, right ?) Why would I want this ? I want it because then this critical information is possible to state in the metadata file and not in some externally semi-related object as the interceptor. (I still like the idea about being able to have the Interceptor have a say on the matter...maybe have an isUnsaved(Object, objectsOwnAnswer) which the interceptor could thus "veto"?!?) I imagine this stuff to be similar to to tag, so .. Which would let the object provide an isUnsaved() method - (which might or might not be an persistent property) Thus this should be allowed: .. (and maybe similar for using it as an id, but here one should maybe just use the current unsaved semantics..?) /max --- This SF.net email is sponsored by: Scholarships for Techies! Can't afford IT training? All 2003 ictp students receive scholarships. Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more. www.ictp.com/training/sourceforge.asp ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Hibernate 2
forgot one... >* Remove the exception that occurs if you save an object > that is already associated with the session. This > makes save() consistent with saveOrUpdate(). >I am probably a +1 on this I would suggest the same mechanism as with delete - it is nice to have it as an option. /max --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Middlegen and XDoclet marriage
- Original Message - From: "Aslak Hellesoy" <[EMAIL PROTECTED]> To: "One Ovthafew" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 6:10 PM Subject: RE: [Hibernate] Middlegen and XDoclet marriage > > >>>>>>>>XDoclet>>>>>>>>>SchemaExport>>>> > > java + @tags hbm.xml SQL DDL > ><< > > > Oh, the beauty! Before I saw Gavin's beautifull drawing I also viewed both approaches as legitimate. But I wanted BOTH possibilities, because of two things: 1. I like the codegenerator and the hbm.xml -> java approach 2. I like XDoclet and saw the ability to provide an [EMAIL PROTECTED] approach for the beginner and intermediate user would be GREAT :) But with the beautifuly drawing I saw symmetry (which is good :) The only real "issue" is that if you are doing Middlegen->hbm.xml->[EMAIL PROTECTED] with the purpose of using the [EMAIL PROTECTED] version to do [EMAIL PROTECTED]>hbm.xml, then it seems rather "redundant" but then again, the XDoclet generation in the code generator would ofcourse be optionalhey, i got to thinkwith my local version of hbm2java (which the codegenerator is called now :) we got the , which is an ideal place for MiddleGen to place it's "additional" XDoclet tags...if that is in any way advantageous... /max > > > > > The the only leg of the roundtripping that is not > > fully reproduceable without user interaction is the > > DDL -> hbm.xml (ie. Middlegen) step. > > > > Middlegen can indeed be run without user interaction. Just say gui="false" > to the middlegen task. If you run it without the gui, it will use defaults > or look at the preferences file (which will exist if Middlegen has been run > previously). > > http://boss.bekk.no/boss/middlegen/ant/index.html#gui > http://boss.bekk.no/boss/middlegen/ant/index.html#prefsdir > > Aslak > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > hibernate-devel mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel
Re: [Hibernate] Road Map
> Some people mentioned that they implemented applications with Hibernate > and put them in production. I've achieved that too, but only the > classic JSP/Servlet/DataAccess Webapp. Has anyone implemented a > three-tier system with Hibernate and lazy collections yet? Depends on what you mean by this :) If you want the toplevel tier (the view) to be able to just wander around in the object model via dot-notation, then no - I have not done that, and no - I'll never implement that :) What I have done is that the top level request some data from my business layer - the business layer opens the session, fetch the data, fill out the possible object graph (with help of Hibernate.initialize(o)) and returns it to the view. Thus here the view got access to an object graph it can start wandering around in - but if it hits some boundary of the object graph that the business layer have not yet "filled in" - they BAM! an Hibernate exception is thrown to tell the developer: "Hey - if you want more data, then ask the business layer for it - don't come here thinking you transparently can fetch data because that can be a performance killer :)" I can't see any other decent way - the View layer should not just assume it got the whole object model available to it... /max --- This SF.NET email is sponsored by: Order your Holiday Geek Presents Now! Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap, MP3 Players, XBox Games, Flying Saucers, WebCams, Smart Putty. T H I N K G E E K . C O M http://www.thinkgeek.com/sf/ ___ hibernate-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/hibernate-devel