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: Gavin K. <ga...@ap...> - 2002-09-19 11:25:39
|
Nice diagram! I wish the Hibernate doco had some diagrams like that.... What I mean by "transactional access" is we would have to be able to = read a value out of the cache, check its timestamp, and then put a new = value in the cache as an atomic operation. Currently we do this by = synchronizing on the strategy object. That approach won't work for a = distributed cache. I detailed an approach that would work (a remote = LockServer) in a previous email. If you read that carefully you will see = exactly how isolation would be broken without it. Gavin ----- Original Message -----=20 From: Christian Meunier=20 To: hib...@li...=20 Sent: Thursday, September 19, 2002 4:32 PM Subject: [Hibernate] JCS cache - Distributable read-write Hi all, well i finally took some times to look at the code ( i really = should had started by this before asking dumb questions... sorry about = that) and i have few observations that need some comments/corrections. Basically, there are 2 main issues with the cache : - First we need to ensure tx isolation as illustrated by the picture. - Second the cache need to support pessimistic locking , so we need = to be able to lock/release object in the cache. First issue is solved by comparing 2 timestamps, the former is the = time when the object was cached and the latter is the time when we = started the transaction and also by testing if the object is fresh. Second issue is addressed by Lock() and Release() method provided by = the CacheConcurrencyStrategy Interface. All the informations that is needed to solve those 2 issues are = encapsulated in the CachedItem Class, it's this class that is cached in = the JCS cache. All the methods in the ReadWriteCache class are synchronized to avoid = any race condition with lock() / release() , it's not needed for tx = isolation. Questions: - Why distributable read-write cache using lateral jcs cache cant = work without hacking the code ? i found this answer from Gavin on the = mailing list: "JCS would need to support transactional access to use it for = distributed "read-write" cache" Gavin, could you elaborate a bit this please, i dont see what you = means exactly. - If i am right with my statement regarding the synchronized issue, = we might want to be able to tell hibernate that we do not need = pessimistic locking ( where Postgres MVCC is good enough for example) = and then provide an unsynchronized ReadWriteCache. Now if JCS is not = thread safe just disregard this comment. Thanks in advance Christian Meunier |
From: Gavin K. <ga...@ap...> - 2002-09-19 11:23:00
|
Yeah, I knew this would come up.... but I'm not quite sure of exactly how to structure the API. I was thinking along the lines of: Query q = session.createQuery(queryString, collection); or: Filter f = session.createFilter(queryString); f.setCollection(coll); List results = f.list(); where Filter extends Query. But now you've raised another possibility. I don't think I like your suggestion because it changes the way Queries are called. (ie. you go to the session to create the query and then go back to the session again to call it.) The first option is good because it lets us compile the query from the createFilter method (we know exactly which collection role to use) and doesn't require any new interfaces. The second is good because it would let you reuse the same Filter object multiple times for different collections. I am leaning towards the first option. Theres an implementation issue that comes up here: I intend to eventually have the query be compiled from the createQuery() method. That way you recieve any compilation exception from that call and then any execution exception from list() or iterate(). This would also mean I would factor a bunch of code out of SessionImpl and onto QueryImpl (a good thing). Currently, however, the query is compiled on the first call to list() or iterate(). (Note that Hibernate caches compiled queries in a WeakRefHashMap on the session factory.) > > Could you also add a method session.filer(Collection, Query)? > > regards > chris |
From: Gavin K. <ga...@ap...> - 2002-09-18 16:54:46
|
Ah, ignore that....I figured out the problem. you need to call setAccessible() for a public member of a package visibility class. ----- Original Message ----- From: "Gavin King" <ga...@ap...> To: "hibernate list" <hib...@li...> Sent: Thursday, September 19, 2002 12:01 AM Subject: [Hibernate] Reflective access to classes with package visibility > Does anyone know how to do the equivalent of > > Method.setAccessible(true) > > for a class? > > Its come up that we can invoke methods of classes with package visibility at > the moment..... > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: AMD - Your access to the experts > on Hammer Technology! Open Source & Linux Developers, register now > for the AMD Developer Symposium. Code: EX8664 > http://www.developwithamd.com/developerlab > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Jozsa K. <dy...@on...> - 2002-09-18 14:12:57
|
Mmm right. And what do you suggest as the new naming convention for the generated foreign key? Clearly it's an oracle problem, but i couldn't even suggest a decent workaround.. dyn On Wed, Sep 18, 2002 at 11:00:51PM +1000, Gavin King wrote: > Hmmmm I suppose we could add a feature like that .... would have to be an > attibute on the many-to-one, key and one-to-one elements. I won't be able to > do it for version 1.1 but perhaps you or someone else wants to have a look > at adding this for 1.2. Shouldn't be terribly hard. > > ----- Original Message ----- > From: "Jozsa Kristof" <dy...@on...> > To: <hib...@li...> > Sent: Wednesday, September 18, 2002 9:56 PM > Subject: [Hibernate] Oracle UTF8, long classnames and generated constraint > names > > > > Hi, > > > > I've met a problem using Hibernate. Can I set somewhere in the mapping > file > > the generated constraints' name? I ask that, cos I have some longer class > > names es (eg. 15 chars), and if there's more than one constraint for the > > given table to persist, only the first one can be persisted. > > > > I guess the problem relies in the Oracle 8i database I use, and the Oracle > > session set to UTF8 by default.. afaik Oracle can use constraint names up > > to 30 chars, but when using utf8, man has to divide that by either 3 or 4 > > (dunno exactly how long UTF8 chars Oracle uses). Therefore, only one of > > those Hibernate-generated constraint names (CLASSNAMEFKx where x is the > > index) can be persisted successfully, all the following ones would be > > detected to be the same by the db. > > > > I hope that all above makes some sense :) > > > > dyn > > > > ps. grepped through the docs for 'constraint' but couldn't find an option > > for setting the name of them.. > > -- > > .Digital.Yearning.for.Networked.Assassination.and.Xenocide > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: AMD - Your access to the experts > > on Hammer Technology! Open Source & Linux Developers, register now > > for the AMD Developer Symposium. Code: EX8664 > > http://www.developwithamd.com/developerlab > > _______________________________________________ > > hibernate-devel mailing list > > hib...@li... > > https://lists.sourceforge.net/lists/listinfo/hibernate-devel > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: AMD - Your access to the experts > on Hammer Technology! Open Source & Linux Developers, register now > for the AMD Developer Symposium. Code: EX8664 > http://www.developwithamd.com/developerlab > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel -- .Digital.Yearning.for.Networked.Assassination.and.Xenocide |
From: Gavin K. <ga...@ap...> - 2002-09-18 14:02:32
|
Does anyone know how to do the equivalent of Method.setAccessible(true) for a class? Its come up that we can invoke methods of classes with package visibility at the moment..... |
From: Christoph S. <ch...@mc...> - 2002-09-18 14:01:14
|
Hi Gavin! ----- Original Message ----- From: "Gavin King" <ga...@ap...> To: "hibernate list" <hib...@li...> Sent: Thursday, September 12, 2002 11:16 AM Subject: [Hibernate] New features: Hibernate ODMG + collection filters > only the elements you are interested in. Accordingly Ive added filtering > methods to the Session interface like: > > filteredCollection = session.filter(collection, query) > > A filter is just a query where you can refer to "this", the collection > element. So, for example: > > blackCats = session.filter( cat.getKittens(), "where this.color='black' > order by this.name" ); > rivals = session.filter( cat.getPotentialMates(), "select this.mate" ); > Could you also add a method session.filer(Collection, Query)? regards chris |
From: Gavin K. <ga...@ap...> - 2002-09-18 13:01:29
|
Hmmmm I suppose we could add a feature like that .... would have to be an attibute on the many-to-one, key and one-to-one elements. I won't be able to do it for version 1.1 but perhaps you or someone else wants to have a look at adding this for 1.2. Shouldn't be terribly hard. ----- Original Message ----- From: "Jozsa Kristof" <dy...@on...> To: <hib...@li...> Sent: Wednesday, September 18, 2002 9:56 PM Subject: [Hibernate] Oracle UTF8, long classnames and generated constraint names > Hi, > > I've met a problem using Hibernate. Can I set somewhere in the mapping file > the generated constraints' name? I ask that, cos I have some longer class > names es (eg. 15 chars), and if there's more than one constraint for the > given table to persist, only the first one can be persisted. > > I guess the problem relies in the Oracle 8i database I use, and the Oracle > session set to UTF8 by default.. afaik Oracle can use constraint names up > to 30 chars, but when using utf8, man has to divide that by either 3 or 4 > (dunno exactly how long UTF8 chars Oracle uses). Therefore, only one of > those Hibernate-generated constraint names (CLASSNAMEFKx where x is the > index) can be persisted successfully, all the following ones would be > detected to be the same by the db. > > I hope that all above makes some sense :) > > dyn > > ps. grepped through the docs for 'constraint' but couldn't find an option > for setting the name of them.. > -- > .Digital.Yearning.for.Networked.Assassination.and.Xenocide > > > ------------------------------------------------------- > This SF.NET email is sponsored by: AMD - Your access to the experts > on Hammer Technology! Open Source & Linux Developers, register now > for the AMD Developer Symposium. Code: EX8664 > http://www.developwithamd.com/developerlab > _______________________________________________ > hibernate-devel mailing list > hib...@li... > https://lists.sourceforge.net/lists/listinfo/hibernate-devel |
From: Jozsa K. <dy...@on...> - 2002-09-18 11:59:51
|
Hi, I've met a problem using Hibernate. Can I set somewhere in the mapping file the generated constraints' name? I ask that, cos I have some longer class names es (eg. 15 chars), and if there's more than one constraint for the given table to persist, only the first one can be persisted. I guess the problem relies in the Oracle 8i database I use, and the Oracle session set to UTF8 by default.. afaik Oracle can use constraint names up to 30 chars, but when using utf8, man has to divide that by either 3 or 4 (dunno exactly how long UTF8 chars Oracle uses). Therefore, only one of those Hibernate-generated constraint names (CLASSNAMEFKx where x is the index) can be persisted successfully, all the following ones would be detected to be the same by the db. I hope that all above makes some sense :) dyn ps. grepped through the docs for 'constraint' but couldn't find an option for setting the name of them.. -- .Digital.Yearning.for.Networked.Assassination.and.Xenocide |
From: Gavin K. <ga...@ap...> - 2002-09-18 05:17:12
|
Sorry, don't know quite what you mean. Do you mean when using a = distributed cache? As long as you use it correctly, the read-write cache should maintain = txn isolation ----- Original Message -----=20 From: Christian Meunier=20 To: Gavin King ; hibernate list=20 Sent: Tuesday, September 17, 2002 11:46 PM Subject: Re: [Hibernate] JCS Read only cache and the doc Thanks Gavin about this. Could you describe in which case, using read-write cache we can break = the transaction isolation please , i dont get it. Thanks in advance and sorry to be such a pain ;) Christian Meunier ----- Original Message -----=20 From: Gavin King=20 To: Christian Meunier ; hibernate list=20 Sent: Tuesday, September 17, 2002 2:18 PM Subject: Re: [Hibernate] JCS Read only cache and the doc read-only cache: objects are added to cache when loaded from database attempt to read object from cache before loading them from database throw an exception if we try to update an object read-write cache: objects are added to cache when loaded from database attempt to read object from cache before loading them from database remove the object from the cache if we try to update the object hope that is clearer :) ----- Original Message -----=20 From: Christian Meunier=20 To: Christian Meunier ; hib...@li...=20 Sent: Tuesday, September 17, 2002 1:22 PM Subject: Re: [Hibernate] JCS Read only cache and the doc I realize that i completly misunderstood which kind of cache = Hibernate provides..... At the moment it appears that hibernate provide either: Cache for immutable objects ( called read-only cache ) Cache for mutable objects ( called read-write cache) It was a semantic issue, for me a read-only cache is a cache where = you never write update in the cache but flush it when an object is = updated while read-write cache will update also the cache entry for the = object. Both those caches are caching mutable objects.... In your read-write cache scenario, i guess you are updating the = cache isnt it ? ( a true read-write cache for mutable objects ) Regards Christian Meunier ----- Original Message -----=20 From: Christian Meunier=20 To: hib...@li...=20 Sent: Monday, September 16, 2002 4:50 AM Subject: [Hibernate] JCS Read only cache and the doc Hi, it's me or the documentation is a bit ambiguous about read = only cache ? "If your application needs to read but never modify instances of = a persistent class, a 'readonly' cache may be used" When i read this, i understand that my persistent class need be = to read only if i want to be able to use a read-only cache. Regards Christian Meunier |
From: Christian M. <vc...@cl...> - 2002-09-17 13:46:26
|
Thanks Gavin about this. Could you describe in which case, using read-write cache we can break = the transaction isolation please , i dont get it. Thanks in advance and sorry to be such a pain ;) Christian Meunier ----- Original Message -----=20 From: Gavin King=20 To: Christian Meunier ; hibernate list=20 Sent: Tuesday, September 17, 2002 2:18 PM Subject: Re: [Hibernate] JCS Read only cache and the doc read-only cache: objects are added to cache when loaded from database attempt to read object from cache before loading them from database throw an exception if we try to update an object read-write cache: objects are added to cache when loaded from database attempt to read object from cache before loading them from database remove the object from the cache if we try to update the object hope that is clearer :) ----- Original Message -----=20 From: Christian Meunier=20 To: Christian Meunier ; hib...@li...=20 Sent: Tuesday, September 17, 2002 1:22 PM Subject: Re: [Hibernate] JCS Read only cache and the doc I realize that i completly misunderstood which kind of cache = Hibernate provides..... At the moment it appears that hibernate provide either: Cache for immutable objects ( called read-only cache ) Cache for mutable objects ( called read-write cache) It was a semantic issue, for me a read-only cache is a cache where = you never write update in the cache but flush it when an object is = updated while read-write cache will update also the cache entry for the = object. Both those caches are caching mutable objects.... In your read-write cache scenario, i guess you are updating the = cache isnt it ? ( a true read-write cache for mutable objects ) Regards Christian Meunier ----- Original Message -----=20 From: Christian Meunier=20 To: hib...@li...=20 Sent: Monday, September 16, 2002 4:50 AM Subject: [Hibernate] JCS Read only cache and the doc Hi, it's me or the documentation is a bit ambiguous about read = only cache ? "If your application needs to read but never modify instances of a = persistent class, a 'readonly' cache may be used" When i read this, i understand that my persistent class need be to = read only if i want to be able to use a read-only cache. Regards Christian Meunier |
From: Gavin K. <ga...@ap...> - 2002-09-17 12:19:28
|
read-only cache: objects are added to cache when loaded from database attempt to read object from cache before loading them from database throw an exception if we try to update an object read-write cache: objects are added to cache when loaded from database attempt to read object from cache before loading them from database remove the object from the cache if we try to update the object hope that is clearer :) ----- Original Message -----=20 From: Christian Meunier=20 To: Christian Meunier ; hib...@li...=20 Sent: Tuesday, September 17, 2002 1:22 PM Subject: Re: [Hibernate] JCS Read only cache and the doc I realize that i completly misunderstood which kind of cache Hibernate = provides..... At the moment it appears that hibernate provide either: Cache for immutable objects ( called read-only cache ) Cache for mutable objects ( called read-write cache) It was a semantic issue, for me a read-only cache is a cache where you = never write update in the cache but flush it when an object is updated = while read-write cache will update also the cache entry for the object. = Both those caches are caching mutable objects.... In your read-write cache scenario, i guess you are updating the cache = isnt it ? ( a true read-write cache for mutable objects ) Regards Christian Meunier ----- Original Message -----=20 From: Christian Meunier=20 To: hib...@li...=20 Sent: Monday, September 16, 2002 4:50 AM Subject: [Hibernate] JCS Read only cache and the doc Hi, it's me or the documentation is a bit ambiguous about read only = cache ? "If your application needs to read but never modify instances of a = persistent class, a 'readonly' cache may be used" When i read this, i understand that my persistent class need be to = read only if i want to be able to use a read-only cache. Regards Christian Meunier |
From: Gavin K. <ga...@ap...> - 2002-09-17 12:04:30
|
Thanks Brad, I see that SortedMap was similarly broken. P.S. We are in feature freeze / bugfix mode right now, so this is exactly the sort of thing we should be looking out for... ----- Original Message ----- From: Brad Clow To: hib...@li... Sent: Tuesday, September 17, 2002 9:27 PM Subject: [Hibernate] SortedSets not being sorted bug yesterday i moved from using version 1.1-b6 to 1.1-rc2 and found that SortedSets were no longer sorted. i have fixed this and commited it to cvs. i have also added two assertions to the testPersistCollections() method in FooBarTest to test that SortedSets r actually sorted. the fix simply involved adding the CollectionPersister argument to the beforeInitialize method in cirrus.hibernate.collections.SortedSet so that the method reflected the signature of the abstract method defined in it's super (abstract) class cirrus.hibernate.collections.PersistenctCollection. brad |
From: Brad C. <bra...@wo...> - 2002-09-17 11:28:09
|
yesterday i moved from using version 1.1-b6 to 1.1-rc2 and found that = SortedSets were no longer sorted. i have fixed this and commited it to = cvs. i have also added two assertions to the testPersistCollections() = method in FooBarTest to test that SortedSets r actually sorted. the fix simply involved adding the CollectionPersister argument to the = beforeInitialize method in cirrus.hibernate.collections.SortedSet so = that the method reflected the signature of the abstract method defined = in it's super (abstract) class = cirrus.hibernate.collections.PersistenctCollection. brad |
From: Christian M. <vc...@cl...> - 2002-09-17 03:22:45
|
I realize that i completly misunderstood which kind of cache Hibernate = provides..... At the moment it appears that hibernate provide either: Cache for immutable objects ( called read-only cache ) Cache for mutable objects ( called read-write cache) It was a semantic issue, for me a read-only cache is a cache where you = never write update in the cache but flush it when an object is updated = while read-write cache will update also the cache entry for the object. = Both those caches are caching mutable objects.... In your read-write cache scenario, i guess you are updating the cache = isnt it ? ( a true read-write cache for mutable objects ) Regards Christian Meunier ----- Original Message -----=20 From: Christian Meunier=20 To: hib...@li...=20 Sent: Monday, September 16, 2002 4:50 AM Subject: [Hibernate] JCS Read only cache and the doc Hi, it's me or the documentation is a bit ambiguous about read only = cache ? "If your application needs to read but never modify instances of a = persistent class, a 'readonly' cache may be used" When i read this, i understand that my persistent class need be to = read only if i want to be able to use a read-only cache. Regards Christian Meunier |
From: Craig G. <cg...@ma...> - 2002-09-16 19:37:52
|
I'm able to get the test code to compile in the Tools folder. So far so good, but I want to give this a try within my own environment. It seemed likely that I would simply include hibernate-xdoclet.jar in my class path. That works only to a degree. My <hibernatedoclet> task is recognized, but the build eventually fails with "<hibernatedoclet> task doesn't support the nested hibernate element". I wonder if this is because I'm using the latest xdoclet cvs drop rather than the jar that is included with the tools distribution. There are no requirements or installation specs included with hibernate xdoclet. Could we get Sebastien or someone else who understands this code to comment? Also: Is this code eventually expected to show up in the xdoclet code base? Is the code robust enough for everyday use or is it just proof of concept -----Original Message----- From: hib...@li... [mailto:hib...@li...]On Behalf Of Gavin King Sent: Wednesday, September 11, 2002 3:25 AM To: hibernate list Subject: [Hibernate] XDoclet Anyone who wants to try out Sebastien Guimont's Hibernate XDoclet extension can get it from CVS in the new "Tools" module. Many thanks to Sebastien for this :) Enjoy! |
From: Christian M. <vc...@cl...> - 2002-09-16 02:51:01
|
Hi, it's me or the documentation is a bit ambiguous about read only = cache ? "If your application needs to read but never modify instances of a = persistent class, a 'readonly' cache may be used" When i read this, i understand that my persistent class need be to read = only if i want to be able to use a read-only cache. Regards Christian Meunier |
From: Gavin K. <ga...@ap...> - 2002-09-15 08:06:21
|
Ah. Thats a bad way of measuring, of course.... The dependencies don't squash, whereas the documentation does! derr... so the 4.5 meg tar.gz breaks down to: 1 meg doc/ 600k hibernate.jar 200k src/ 3 meg lib/ So its the dependencies killing us. We *could* externalise optional jars: jcs.jar, commons-lang.jar, c3p0.jar, commons-dbcp.jar, commons-pool.jar, commons-collections.jar but Hibernate wouldnt compile without them ----- Original Message ----- From: "Gavin King" <ga...@ap...> To: <hib...@li...> Sent: Sunday, September 15, 2002 5:53 PM Subject: [Hibernate] 5 meg worth of hibernate..... > Hmmm. The latest filesizes have got a bit out of hand: > > hibernate-1.1rc2.tar.gz 4649334 > hibernate-1.1rc2.zip 5300474 > > unzipped its over 10 meg: > > * 1.1 meg src/ > * 3.1 meg lib/ > * 6 meg doc/ > * 600k hibernate.jar > > I was going to suggest a seperate source distribution, but thats not really > going to be much help. The real killer is all the doco (and note we aren't > even distributing the documentation source). > > If anyone has a problem with it being a 5 meg download, please let me > know.... > > > > > > ------------------------------------------------------- > 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: Gavin K. <ga...@ap...> - 2002-09-15 07:52:46
|
Hmmm. The latest filesizes have got a bit out of hand: hibernate-1.1rc2.tar.gz 4649334 hibernate-1.1rc2.zip 5300474 unzipped its over 10 meg: * 1.1 meg src/ * 3.1 meg lib/ * 6 meg doc/ * 600k hibernate.jar I was going to suggest a seperate source distribution, but thats not really going to be much help. The real killer is all the doco (and note we aren't even distributing the documentation source). If anyone has a problem with it being a 5 meg download, please let me know.... |
From: Gavin K. <ga...@ap...> - 2002-09-13 18:28:31
|
Yeah, pretty much. The point is really that Hibernate doesn't need to be involved in that kind of filtering, because it occurs entirely in memory. ----- Original Message ----- From: "Anton van Straaten" <an...@ap...> To: "hibernate list" <hib...@li...> Sent: Saturday, September 14, 2002 12:21 AM Subject: [Hibernate] RE: session.filter(Collection, Predicate)? > I realized in the cold light of day that what I was asking about below can't > possibly work unless the object being filtered has already been fully > loaded, which I presume would defeat the purpose of the filter. Is that > correct? > > > > -----Original Message----- > > From: Anton van Straaten [mailto:an...@ap...] > > Sent: Friday, September 13, 2002 1:45 AM > > To: hibernate list > > Subject: session.filter(Collection, Predicate)? > > > > > > > Accordingly Ive added filtering > > > methods to the Session interface like: > > > > > > filteredCollection = session.filter(collection, query) > > > > > > A filter is just a query where you can refer to "this", the collection > > > element. So, for example: > > > > > > blackCats = session.filter( cat.getKittens(), "where > > this.color='black' > > > order by this.name" ); > > > > Slightly tangential question about this: how straightforward (or > > not) would it be to support an object as the filter parameter? I > > use a Predicate interface in my own code: > > > > public interface Predicate { > > // Apply predicate to a specified object and return boolean result > > boolean apply(Object o); > > } > > > > This can be used to create arbitrary objects to filter on any > > condition - I use it for filtering Java collections and arrays. > > You can also use it inline, e.g.: > > > > blackCats = session.filter( cat.getKittens(), new Predicate() { > > public boolean apply(Object o) { > > return o.color.equals("black"); > > } > > }); > > > > I don't know anything about what Hibernate is doing when it's > > retrieving & filtering a query - if something like this wouldn't > > require too much internal rearranging, I might take a stab at it, > > since it would fit in with some of the other code I'm using. In > > fact it came up in some code which I've just installed for > > testing, and I ended up building a query string to do it instead. > > In some cases, I prefer the approach I've described since it's > > subject to static checking, supports refactoring, etc. > > > > Anton > > > > > > ------------------------------------------------------- > 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: Gavin K. <ga...@ap...> - 2002-09-13 18:21:11
|
Thanks Christoph! ----- Original Message ----- From: "Christoph Sturm" <ch...@mc...> To: <hib...@li...> Sent: Friday, September 13, 2002 11:56 PM Subject: [Hibernate] fix for bug in lazy initializer > Hey Gavin and all! > > Today I found the great feature of Hibernates lazy initializer, that it > doesnt load the object if you read only the id of the object. (the id is > already loaded). > Sadly it didnt work, because it compared the invoked method with the > pk-getter of the class, and not the proxy interface. > > To fix it I had to change ClassPersister like this: > Index: cirrus/hibernate/impl/ClassPersister.java > =================================================================== > RCS file: > /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/ClassPersister.java,v > retrieving revision 1.139 > diff -r1.139 ClassPersister.java > 506c506,510 > < getIdentifierMethod = ReflectHelper.getGetterMethod(mappedClass, > identifierPropertyName); > --- > > final Class proxyInterface = model.getProxyInterface(); > > if (proxyInterface != null) > > getIdentifierMethod = ReflectHelper.getGetterMethod(proxyInterface, > identifierPropertyName); > > else > > getIdentifierMethod = ReflectHelper.getGetterMethod(mappedClass, > identifierPropertyName); > > The variable name getIdentifierMethod is a bit misleading now, so maybe you > will want to change the name. > > regards, > chris > > > > ------------------------------------------------------- > 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: Anton v. S. <an...@ap...> - 2002-09-13 14:19:09
|
I realized in the cold light of day that what I was asking about below can't possibly work unless the object being filtered has already been fully loaded, which I presume would defeat the purpose of the filter. Is that correct? > -----Original Message----- > From: Anton van Straaten [mailto:an...@ap...] > Sent: Friday, September 13, 2002 1:45 AM > To: hibernate list > Subject: session.filter(Collection, Predicate)? > > > > Accordingly Ive added filtering > > methods to the Session interface like: > > > > filteredCollection = session.filter(collection, query) > > > > A filter is just a query where you can refer to "this", the collection > > element. So, for example: > > > > blackCats = session.filter( cat.getKittens(), "where > this.color='black' > > order by this.name" ); > > Slightly tangential question about this: how straightforward (or > not) would it be to support an object as the filter parameter? I > use a Predicate interface in my own code: > > public interface Predicate { > // Apply predicate to a specified object and return boolean result > boolean apply(Object o); > } > > This can be used to create arbitrary objects to filter on any > condition - I use it for filtering Java collections and arrays. > You can also use it inline, e.g.: > > blackCats = session.filter( cat.getKittens(), new Predicate() { > public boolean apply(Object o) { > return o.color.equals("black"); > } > }); > > I don't know anything about what Hibernate is doing when it's > retrieving & filtering a query - if something like this wouldn't > require too much internal rearranging, I might take a stab at it, > since it would fit in with some of the other code I'm using. In > fact it came up in some code which I've just installed for > testing, and I ended up building a query string to do it instead. > In some cases, I prefer the approach I've described since it's > subject to static checking, supports refactoring, etc. > > Anton > |
From: Christoph S. <ch...@mc...> - 2002-09-13 13:58:28
|
Hey Gavin and all! Today I found the great feature of Hibernates lazy initializer, that it doesnt load the object if you read only the id of the object. (the id is already loaded). Sadly it didnt work, because it compared the invoked method with the pk-getter of the class, and not the proxy interface. To fix it I had to change ClassPersister like this: Index: cirrus/hibernate/impl/ClassPersister.java =================================================================== RCS file: /cvsroot/hibernate/Hibernate/cirrus/hibernate/impl/ClassPersister.java,v retrieving revision 1.139 diff -r1.139 ClassPersister.java 506c506,510 < getIdentifierMethod = ReflectHelper.getGetterMethod(mappedClass, identifierPropertyName); --- > final Class proxyInterface = model.getProxyInterface(); > if (proxyInterface != null) > getIdentifierMethod = ReflectHelper.getGetterMethod(proxyInterface, identifierPropertyName); > else > getIdentifierMethod = ReflectHelper.getGetterMethod(mappedClass, identifierPropertyName); The variable name getIdentifierMethod is a bit misleading now, so maybe you will want to change the name. regards, chris |
From: Anton v. S. <an...@ap...> - 2002-09-13 05:45:24
|
> Accordingly Ive added filtering > methods to the Session interface like: > > filteredCollection = session.filter(collection, query) > > A filter is just a query where you can refer to "this", the collection > element. So, for example: > > blackCats = session.filter( cat.getKittens(), "where this.color='black' > order by this.name" ); Slightly tangential question about this: how straightforward (or not) would it be to support an object as the filter parameter? I use a Predicate interface in my own code: public interface Predicate { // Apply predicate to a specified object and return boolean result boolean apply(Object o); } This can be used to create arbitrary objects to filter on any condition - I use it for filtering Java collections and arrays. You can also use it inline, e.g.: blackCats = session.filter( cat.getKittens(), new Predicate() { public boolean apply(Object o) { return o.color.equals("black"); } }); I don't know anything about what Hibernate is doing when it's retrieving & filtering a query - if something like this wouldn't require too much internal rearranging, I might take a stab at it, since it would fit in with some of the other code I'm using. In fact it came up in some code which I've just installed for testing, and I ended up building a query string to do it instead. In some cases, I prefer the approach I've described since it's subject to static checking, supports refactoring, etc. Anton |
From: Gavin K. <ga...@ap...> - 2002-09-12 09:17:50
|
Hi everyone. I've created an experimental ODMG3 API for Hibernate. Unfortunately I don't own a copy of the ODMG spec (you have to *buy* it, unfortunately) so I'm not 100% sure of some semantics. Also, some concepts don't map perfectly to an O/R tool. The main missing thing is an ODMG-style OQL. I don't think Hibernate's query language is very far removed from OQL but there are some differences (particularly collections). I would need some proper OQL documentation before we could start to support the ODMG style syntax because the ODMG implementations I've investigated don't seem agree on some of these points. Another issue is persistence by reachability. Mapping all associations with cascade="save/update" (also a new feature) would come close to the ODMG programming model but perhaps we should allow some setting which forces cascade to *default* to "save/update". Hibernate collection wrappers now implement the ODMG interfaces, ie DCollection, DMap, DList, DSet, etc. To do this, I needed collection-filtering functionality. I saw that this was useful for Hibernate itself, since it lets you take a large, uninitialized collection and load up only the elements you are interested in. Accordingly Ive added filtering methods to the Session interface like: filteredCollection = session.filter(collection, query) A filter is just a query where you can refer to "this", the collection element. So, for example: blackCats = session.filter( cat.getKittens(), "where this.color='black' order by this.name" ); rivals = session.filter( cat.getPotentialMates(), "select this.mate" ); Now, I certainly don't propose to make the ODMG API the recommended way to use Hibernate. Hibernate's own API is much more expressive. It would be nice, though, if we could find someone here with a better knowledge of the ODMG spec to take ownership of this feature and develop it towards fuller compliance. Gavin |
From: Jon L. <jon...@xe...> - 2002-09-11 07:58:15
|
Aah... That was the source of my confusion. I thought onUpdate would get called when a dirty object is updated in the database. I just ran a quick test, and it does indead work as you described when the object is transient between sessions. I can think of quite a few reasons myself why a callback before persisting changes doesn't make sense, but nonetheless it would have made my life really easy about now. ;-) Once I figure out a way to solve my callback problem in a different way, I will start working on the Oracle outer join stuff. Thanks, Jon... ----- Original Message ----- From: "Gavin King" <ga...@ap...> To: "Jon Lipsky" <jon...@xe...> Cc: "hibernate list" <hib...@li...> Sent: Wednesday, September 11, 2002 9:48 AM Subject: Re: [Hibernate] Question about onUpdate > > It appears to me that the onUpdate() method is not getting called when it > should. > > onUpdate() gets called only when you explicitly pass a transient object to > Session.update(). ie. its called when a transient object becomes > "sessional". Its not called when an dirty object is UPDATEd on the database. > I'm not sure if that is the source of some confusion, or if there is an > actual bug. > > I know it seems to make sense to have a callback just before changes are > persisted, and I spent a lot of time thinking about that. However, I decided > that this was actually not a good idea for a number of reasons (I will > describe them if you want but my girlie wants to us the computer now so I > don't have time...) > > > Before I go digging around and trying to fix this, I wanted to make sure > no one else was working on it. > > Yeah, could you please check thats its working as I described. There is a > test for this but tests are not infallible. > > > PS - Is anyone working on adding outer join support for Oracle? If not, > then I'd like to volunteer to do this. > > Yes, please. No-one is working on this AFAIK and I'm not planning to > implement it myself. > > > I'm playing around with a little ODMG-compliant API adaptor at the moment. > Much less powerful API than Hibernate, because ODMG was designed as a > lowest-common-denominator thing. But its is an established standard. Doesn't > hurt to support it as an alternative. > > > |