You can subscribe to this list here.
2002 |
Jan
(2) |
Feb
(157) |
Mar
(111) |
Apr
(61) |
May
(68) |
Jun
(45) |
Jul
(101) |
Aug
(132) |
Sep
(148) |
Oct
(227) |
Nov
(141) |
Dec
(285) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(518) |
Feb
(462) |
Mar
(390) |
Apr
(488) |
May
(321) |
Jun
(336) |
Jul
(268) |
Aug
(374) |
Sep
(211) |
Oct
(246) |
Nov
(239) |
Dec
(173) |
2004 |
Jan
(110) |
Feb
(131) |
Mar
(85) |
Apr
(120) |
May
(82) |
Jun
(101) |
Jul
(54) |
Aug
(65) |
Sep
(94) |
Oct
(51) |
Nov
(56) |
Dec
(168) |
2005 |
Jan
(146) |
Feb
(98) |
Mar
(75) |
Apr
(118) |
May
(85) |
Jun
(75) |
Jul
(44) |
Aug
(94) |
Sep
(70) |
Oct
(84) |
Nov
(115) |
Dec
(52) |
2006 |
Jan
(113) |
Feb
(83) |
Mar
(217) |
Apr
(158) |
May
(219) |
Jun
(218) |
Jul
(189) |
Aug
(39) |
Sep
(3) |
Oct
(7) |
Nov
(4) |
Dec
(2) |
2007 |
Jan
|
Feb
(2) |
Mar
(7) |
Apr
(3) |
May
(3) |
Jun
(8) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(4) |
Nov
(7) |
Dec
|
2008 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(4) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2009 |
Jan
(6) |
Feb
|
Mar
(1) |
Apr
(2) |
May
(1) |
Jun
(1) |
Jul
(10) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(3) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Russell S. <rs...@co...> - 2002-12-23 18:28:52
|
I have submitted a patch to the SF patch manager which allows Query.setMaxResults() to work even on databases which do not support PreparedStatement.setMaxRows(), such as SAPDB (which we must work with). The change is small, but it should increase compatablity greatly. My patch also includes removing the workaround from the test for this feature for SAPDB. |
From: <no...@so...> - 2002-12-23 18:19:58
|
Patches item #657927, was opened at 2002-12-23 18:19 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428710&aid=657927&group_id=40712 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: J. Russell Smyth (drfish) Assigned to: Nobody/Anonymous (nobody) Summary: make Query.setMaxResults work for SAPDB Initial Comment: Some databases do not fully support PreparedStatement.setMaxRows() (Notably SAPDB when using scrollable result sets, as indicated by the workaround in SQLFunctionsTest) This patch will allow Query.setMaxResults to work even if the database in question does not correctly support PreparedStatement.setMaxRows() ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428710&aid=657927&group_id=40712 |
From: Ara A. <ar...@ya...> - 2002-12-23 17:59:02
|
A configurable approach is indeed better than coding it. That'll be great to be able to define <load-policy/> elements and specify which fields should be loaded for that policy. And a LoadPolicy class would make it possible to more dynamically specify what should be loaded. Ara. > -----Original Message----- > From: hib...@li... [mailto:hibernate-devel- > ad...@li...] On Behalf Of Brad Clow > Sent: Monday, December 23, 2002 7:49 AM > To: Mark Woon > Cc: hib...@li... > Subject: RE: [Hibernate] Road Map > > use proxies if u want to lazy load objects. > > brad > > > > > I'd also love to see the ability to lazy-load objects instead of just > > collections... > > > > -Mark > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Konstantin P. <kpr...@ya...> - 2002-12-23 14:32:45
|
--- Gavin King <Gav...@ex...> wrote: > A couple of comments: > > 1. The collection-key tag should not specify a > generator-class unless > you intended it to be toplevel, which I didn't > think was supported > by the XDoclet module and certainly won't be > supported in Hibernate > 2.0. It only really needs to specify a column > attribute. Current xdoclet stuff is not very intuitive. For example it needs 3 tags to specify bag - hibernate.bag, hibernate.collection-one-to-many & hibernate.collection-key ( and maybe about jca cache ) - "this sux" (c) Burt Simpson :) Though I'm working to make it better, but first I need some more knowlege of hibernate... Toplevel collections are difficult for xdoclet - xdoclet works with source classes, so I'm not sure where they shall be defined. > 2. session.close() should be called in a finally > block. but still wrapped in try-catch - since it throws HIbernateException & SQException :) > 3. strictly, you are supposed to call > session.flush() even after a > save(). In this very simple case you can get away > with it but in > other cases, and when any other style of id > generation than > "native" is used, its needed. Well, already doing this. > Otherwise, this is turning into a very useful demo. Not yet. Updating customer with collection opf addresses does not work, also deleting... Maybe I'm an idiot, or hibernate docs are not complete enough... 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 |
From: Max R. A. <ma...@eo...> - 2002-12-23 12:54:01
|
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" <ma...@eo...> To: <hib...@li...> 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 > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > |
From: Max R. A. <ma...@eo...> - 2002-12-23 08:24:40
|
I must say it looks complex, but sweet :) Only problem is it's GPL license - makes it unusable for my projects - bummer :( /max ----- Original Message ----- From: "Gavin King" <Gav...@ex...> To: <hib...@li...> Sent: Monday, December 23, 2002 8:47 AM Subject: [Hibernate] CarrierWave Would someone have a look over this: http://carrierwave.sourceforge.net/doc/Overview.html and figure out exactly what it does and how it does it .... it has a Hibernate persistence provider, apparently, and seems to maybe help with the problem of retrieving a fully initialized graph of objects. I havn't quite got time to try to get my head around it right now. Gavin ********** 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 ********** |
From: Christian B. <chr...@bl...> - 2002-12-23 08:11:25
|
On 23 Dec (18:47), Gavin King wrote: > Would someone have a look over this: > > http://carrierwave.sourceforge.net/doc/Overview.html > > and figure out exactly what it does and how it does it .... it has > a Hibernate persistence provider, apparently, and seems to > maybe help with the problem of retrieving a fully initialized > graph of objects. > > I havn't quite got time to try to get my head around it right now. Ah, I developed something similar to this for my company: An abstract Criteria. We faced the problem of decoupling the client from the Business Facade: A client view needs all Persons whose firstName is "Foo" and wants the returned Collection to be a sorted List by "lastName". Imagine other abstract "queries" or "criterias" like that. The EJB Entity Bean approach would be to model methods and finders for every kind of query. Thats not a solution of course. Our abstract Criteria is an object query parse tree, you just build the Query in memory with method calls like infix/postfix/projection/selection/whereClause/and-much-more This gives you a Criteria object which can be passed down to the Business Facade to retrieve Collections. A method would be defined as "findPersonsByCriteria(Criteria criteria)". The DAO (abstract DAO factory) also receives a Criteria. The magic part is: The Criteria has Generators for, currently: EJB-QL, SQL, HQL. EJB-QL is pretty useless, but it was an easy start. The DAO uses the appropriate Generator to produce the real query for its native implementation, e.g. the HQLGenerator. So far, we used the Criteria on a couple of projects and never wrote any SQL or other queries by hand. I like it. :) CarrierWave has the same idea, but a different implementation and some features our Criteria doesn't have or would be outside the scope (like modification of the graph). -- Christian Bauer tu...@in... |
From: Gavin K. <Gav...@ex...> - 2002-12-23 07:47:24
|
Would someone have a look over this: http://carrierwave.sourceforge.net/doc/Overview.html and figure out exactly what it does and how it does it .... it has a Hibernate persistence provider, apparently, and seems to maybe help with the problem of retrieving a fully initialized graph of objects. I havn't quite got time to try to get my head around it right now. Gavin ********** 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 ********** |
From: Brad C. <bra...@wo...> - 2002-12-23 04:20:08
|
use proxies if u want to lazy load objects. brad >=20 > I'd also love to see the ability to lazy-load objects instead of just=20 > collections... >=20 > -Mark |
From: Mark W. <mor...@SM...> - 2002-12-23 02:33:53
|
Ara Abrahamian wrote: >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. > +1 I'd also love to see the ability to lazy-load objects instead of just collections... -Mark |
From: Gavin K. <Gav...@ex...> - 2002-12-23 00:22:30
|
Oh .... no .... you aren't meant to call it after *every* flush! That would be insanely inefficient..... Anyway, we don't necessarily *want* to flush saves immediately. For example: s.save(bar); s.save(foo); foo.setBar(bar); foo.setName("Foo"); s.flush(); Is much more efficient in the current implementation than if INSERTs were executed immediately. (And is also more efficent with any id generation strategy other than "native".) > -----Original Message----- > From: Mark Woon [mailto:mor...@SM...]=20 > Sent: Sunday, 22 December 2002 6:04 PM > To: Gavin King > Subject: Re: [Hibernate] New version of hibernate/xdoclet/jboss demo >=20 >=20 > Gavin King wrote: >=20 > >3. strictly, you are supposed to call session.flush() even after a=20 > > save(). In this very simple case you can get away with it but in > > other cases, and when any other style of id generation than > > "native" is used, its needed. > > =20 > > >=20 > Why don't we just have session.save() automatically call=20 > session.flush()? >=20 > -Mark >=20 >=20 >=20 ********** 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 ********** |
From: Max R. A. <ma...@eo...> - 2002-12-22 23:03:25
|
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 |
From: Max R. A. <ma...@eo...> - 2002-12-22 19:07:20
|
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" <ar...@ya...> To: <hib...@li...> 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: hib...@li... > [mailto:hibernate-devel- > > ad...@li...] On Behalf Of Christian Bauer > > Sent: Sunday, December 22, 2002 3:46 AM > > To: hib...@li... > > 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 > > tu...@in... > > > > > > ------------------------------------------------------- > > 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 > > hib...@li... > > 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 > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > |
From: Matt R. <ma...@ra...> - 2002-12-22 19:03:37
|
I have a user object and resume object, where there is a one-to-many relationship of users to resumes. I am expecting a couple of things to happen for me - and they aren't most likely because I haven't read the document and don't understand hibernate enough. One, when I add a new resume with the code below, I'm expecting a user to get a resume from this: user = dao.getUser("tomcat"); assertTrue(user != null); resume = new Resume(); resume.setName("sample resume"); resume.setDescription("dsd"); resume.setObjective("blah"); resume.setUserId(user.getId()); Resume returned = dao.addResume(resume); However, it doesn't - so I added the following: user.addResume(returned); And now the user gets a resume - is this expected behavior? If so, should I do this in a DAO (the hibernate implementation class) or in my business object? Secondly, is it possible to get the user's resume's with the dao.getUser() call? If so, do I have to do something special - as in - do I have to lookup the children using an OQL clause? I was *hoping* this was done for me automagically. Thanks, Matt |
From: Ara A. <ar...@ya...> - 2002-12-22 18:30:24
|
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: hib...@li... [mailto:hibernate-devel- > ad...@li...] On Behalf Of Christian Bauer > Sent: Sunday, December 22, 2002 3:46 AM > To: hib...@li... > 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 > tu...@in... > > > ------------------------------------------------------- > 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 > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Konstantin P. <kpr...@ya...> - 2002-12-22 18:28:29
|
--- Matt Raible <ma...@ra...> wrote: > I got it to work by looking at your example > Konstantin. Thanks! > > Now I'm having a problem where I want to set a > unique contraint on name > and userId in my resume table. Following > Konstantin's example, I have > my one-to-many relationship information on my User > class, and the Resume > class just has a userId column. In other words, the > Resume knows > nothing about the relationship (right). > > Is it possible to change my getResume's xdoclet tags > to handle this? Give XDoclet GUI a spin - it provides [rudientary] help in tagging your classes... And also some explanations. 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 |
From: Matt R. <ma...@ra...> - 2002-12-22 17:48:45
|
I got it to work by looking at your example Konstantin. Thanks! Now I'm having a problem where I want to set a unique contraint on name and userId in my resume table. Following Konstantin's example, I have my one-to-many relationship information on my User class, and the Resume class just has a userId column. In other words, the Resume knows nothing about the relationship (right). Is it possible to change my getResume's xdoclet tags to handle this? /** * Returns the resumes. * @return Set * * @hibernate.set role="resumes" table="resume" * @hibernate.collection-key column="id" length="32" * @hibernate.collection-one-to-many class="org.apache.persistence.Resume" * @ejb.persistence */ public Set getResumes() { return resumes; } Thanks, Matt > -----Original Message----- > From: hib...@li... > [mailto:hib...@li...] On > Behalf Of Konstantin Priblouda > Sent: Sunday, December 22, 2002 7:00 AM > To: Matt Raible > Cc: hibernate-devel > Subject: Re: [Hibernate] Problem using Xdoclet to generate > relationships [newbie] > > > > --- Matt Raible <ma...@ra...> wrote: > > I'm a rookie at using Hibernate, so please bear with > > me. > > > > I have User object that has a one-to-many mapping to > > a Resume object. I > > am getting the exception below when trying to > > persist the resume. > > > > I believe I might be doing something wrong with the > > addMethod method on > > my DAO. The passed in "resume" object already has a > > "user" object set > > on it. > > > > It looks that it does not like your classes... > Unfortunately you did not provided line numbers in yur > snippet - si I can not say what exactly offendet > hibernate... > > 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 hib...@li... https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Max R. A. <ma...@eo...> - 2002-12-22 17:25:37
|
whoops - forgot to correct the reply address.... so here it goes again :) ----- Original Message ----- From: "Max Rydahl Andersen" <ma...@eo...> To: "Gavin King" <Gav...@ex...> 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 > uniform access to the result e.g. in a JTable > > rs.execute(); > while(rs.next()) { > String myId = rs.getString("p.id"); // converts the long to an String > int age = rs.getInt("p.age"); > String name = (Doctor)rs.getObject("doc"); > ... > } > > Personally I find it a strength if Hibernate could provide such an > interface - and I don't see why it "conflicts" with OR mapping. Remember > that even since JDBC 1.0 and even more in JDBC 2/3.0 there has been support > for having ResultSet's return objects. > > /max > > > > > > > > |
From: Herve T. <htc...@sy...> - 2002-12-22 16:19:06
|
I'm using JBoss-3.0.4_Tomcat-4.1.12. I've successfully install hibernate MBean in java:/tspaceHibernate I can obtain the SessionFactory from any SessionBean, but when I try to access it from my servlet I receive the following error: javax.naming.NamingException: Could not dereference object. Root exception is java.lang.NullPointerException Is there any problem to access the Hibernate JMX from the web-layer? Or, what's wrong with my code? ------------------------------------------------------------- code: System.out.println( "Loading Hibernate SessionFactory" ); InitialContext ic = new InitialContext(); _sfactory = ( SessionFactory )ic.lookup( "java:comp/env/hibernate/SessionFactory" ); ------------------------------------------------------------- Here is web.xml: <servlet> <servlet-name>JUnitEETestServlet</servlet-name> <display-name>JunitServletRunner Application</display-name> <servlet-class>tspace.services.test.TestServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>JUnitEETestServlet</servlet-name> <url-pattern>/TestServlet/*</url-pattern> </servlet-mapping> <resource-ref > <res-ref-name>hibernate/SessionFactory</res-ref-name> <res-type>cirrus.hibernate.SessionFactory</res-type> <res-auth>Container</res-auth> </resource-ref> ------------------------------------------------------------- jboss-web.xml: <jboss-web> <resource-ref> <res-ref-name>hibernate/SessionFactory</res-ref-name> <jndi-name>java:/tspaceHibernate</jndi-name> </resource-ref> </jboss-web> ------------------------------------------------------------- stack-trace: Could not dereference object javax.naming.NamingException: Could not dereference object. Root exception is java.lang.NullPointerException at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:553) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:592) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:443) at javax.naming.InitialContext.lookup(InitialContext.java:347) at tspace.services.test.BaseTestCase.setUp(Unknown Source) at tspace.services.invitation.test.InvitationServiceTest.setUp(Unknown Source) at org.junitee.runner.TestRunner$1.run(TestRunner.java:72) at org.junitee.runner.TestRunner.run(TestRunner.java:95) at org.junitee.servlet.JUnitEEServlet.runTests(JUnitEEServlet.java:212) at org.junitee.servlet.JUnitEEServlet.doGet(JUnitEEServlet.java:188) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:469) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174) at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1040) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1151) at java.lang.Thread.run(Thread.java:536) -- Herve Tchepannou mailto:htc...@sy... |
From: Konstantin P. <kpr...@ya...> - 2002-12-22 13:59:37
|
--- Matt Raible <ma...@ra...> wrote: > I'm a rookie at using Hibernate, so please bear with > me. > > I have User object that has a one-to-many mapping to > a Resume object. I > am getting the exception below when trying to > persist the resume. > > I believe I might be doing something wrong with the > addMethod method on > my DAO. The passed in "resume" object already has a > "user" object set > on it. > It looks that it does not like your classes... Unfortunately you did not provided line numbers in yur snippet - si I can not say what exactly offendet hibernate... 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 |
From: Matt R. <ma...@ra...> - 2002-12-22 10:48:24
|
I'm a rookie at using Hibernate, so please bear with me. I have User object that has a one-to-many mapping to a Resume object. I am getting the exception below when trying to persist the resume. I believe I might be doing something wrong with the addMethod method on my DAO. The passed in "resume" object already has a "user" object set on it. public Resume addResume(Resume resume) throws DAOException { User user = null; Session ses = null; try { ses = sessionFactory.openSession(); // validate that a user exists for this resume if (resume.getUser() == null) { throw new DAOException("No user assigned to resume!"); } ses.save(resume); ses.flush(); ses.connection().commit(); } catch (Exception e) { try { ses.connection().rollback(); } catch (Exception ex) { e.printStackTrace(); }; throw new DAOException(e); } finally { try { ses.close(); } catch (Exception ex) { ex.printStackTrace(); }; } return resume; } Testcase: testAddResume(org.apache.persistence.ApplicationDAOHibernateTest): Caused an ERROR java.lang.ClassCastException org.apache.persistence.DAOException: java.lang.ClassCastException at org.apache.persistence.ApplicationDAOHibernate.addResume(ApplicationDAOH ibernate.java:146) at org.apache.persistence.ApplicationDAOHibernateTest.testAddResume(Applica tionDAOHibernateTest.java:82) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) Caused by: java.lang.ClassCastException at cirrus.hibernate.type.StringType.set(StringType.java:20) at cirrus.hibernate.type.NullableType.nullSafeSet(NullableType.java:32) at cirrus.hibernate.type.NullableType.nullSafeSet(NullableType.java:24) at cirrus.hibernate.persister.EntityPersister.dehydrate(EntityPersister.jav a:394) at cirrus.hibernate.persister.EntityPersister.insert(EntityPersister.java:4 76) at cirrus.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java :20) at cirrus.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:1674) at cirrus.hibernate.impl.SessionImpl.execute(SessionImpl.java:1654) at cirrus.hibernate.impl.SessionImpl.flush(SessionImpl.java:1599) at org.apache.persistence.ApplicationDAOHibernate.addResume(ApplicationDAOH ibernate.java:139) ... 15 more |
From: Gavin K. <ga...@ap...> - 2002-12-22 09:02:10
|
You'll have to grab a CVS checkout and build it yourself. sorry ;) ----- Original Message ----- From: "Herve Tchepannou" <htc...@sy...> To: <hib...@li...> Sent: Sunday, December 22, 2002 3:14 PM Subject: [Hibernate] where can I get hibernate nightly build? > where can I get hibernate nightly build? > -- > > Herve Tchepannou > mailto:htc...@sy... > > > > ------------------------------------------------------- > 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 > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Juozas B. <ba...@ma...> - 2002-12-22 08:52:50
|
Hi, this feature was sugested on forum. I do not want to send my hibernate.properties, it is modified . Is it possible to remove hibernate.properties file from cvs and add hibernate.properties.sample ? (I need to modify this file every time I update) #hibernate.dbcp.validationQuery "SELECT 1 FROM MY_TABLE WHERE 0=1" "SELECT 1" "SELECT 1 FROM DUAL" ... |
From: Herve T. <htc...@sy...> - 2002-12-22 04:04:02
|
where can I get hibernate nightly build? -- Herve Tchepannou mailto:htc...@sy... |
From: Gavin K. <Gav...@ex...> - 2002-12-22 03:11:52
|
A couple of comments: 1. The collection-key tag should not specify a generator-class unless=20 you intended it to be toplevel, which I didn't think was supported by the XDoclet module and certainly won't be supported in Hibernate=20 2.0. It only really needs to specify a column attribute. 2. session.close() should be called in a finally block. 3. strictly, you are supposed to call session.flush() even after a=20 save(). In this very simple case you can get away with it but in other cases, and when any other style of id generation than "native" is used, its needed. Otherwise, this is turning into a very useful demo. Gavin > -----Original Message----- > From: Konstantin Priblouda [mailto:kpr...@ya...]=20 > Sent: Friday, 20 December 2002 12:35 AM > To: xdoclet-devel > Cc: hibernate-devel > Subject: [Hibernate] New version of hibernate/xdoclet/jboss demo >=20 >=20 > Hi all,=20 > I compiled new ( and enhanced ) version of=20 > my demo for hibernate/xdoclet/jboss >=20 > Now there are: > - 3 Entites: address, customer, country > - 1 : n relation ( customer has several addresses ) > - relation address - country >=20 > you will need current CVS version of xdoclet hibernate > module to run this.=20 >=20 > Small documentation is ontained in README.txt >=20 > regards, >=20 > =3D=3D=3D=3D=3D > Konstantin Priblouda ( ko5tik ) Freelance Software developer > < http://www.pribluda.de > < play java games ->=20 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: 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 hib...@li... 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 ********** |