[Hibernate] Question about caching

2004-09-15 Thread Michał Mosiewicz
I've been testing cache. I've noticed there is much less cache hits that I supposed it should be. Then I discovered the following behaviour: DEBUG [Thread-0] (ReadWriteCache.java:68) - Cache lookup: 40201 DEBUG [Thread-0] (ReadWriteCache.java:78) - Cache hit: 40201 DEBUG [Thread-0] (ReadWriteCache

[Hibernate] Overlapping mapping, one-to-one relation problem

2004-08-23 Thread Michał Mosiewicz
Helo, I've got this problem. I have a class say "Account" that has a single property "balance". I wold like to create two descendant class "AccountIn" with property "balanceIn" and "AccountOut" with property "balanceOut" that both inherit Account and I would like them to be related one-to-one. Fin

[Hibernate] Trying to understand caching...

2003-08-28 Thread Michał Mosiewicz
Examining JCS cache stats I've noticed a lot of cache misses and zero hits, with zero cache size. It seems like something is trying to get from cache, but nether puts? Is this due to the fact that lazy loading objects causes examining cache in case the object is there, but not really loading them?

[Hibernate] Caching of densly related data

2003-08-26 Thread Michał Mosiewicz
I've been trying to estimate how caching would influence the performance of my app. This app has a lot of parent-child relationships in different configurations, i.e. each object have childs in a bag, and mapped (two one-many relations). During the test I've added about 1000 objects randomly select

[Hibernate] Component lazy initialization

2003-08-17 Thread Michał Mosiewicz
Would that be possible to add lazy initialization to components or one-to-one elements? I'm looking for functionality similiar to that in JAWS (JBoss) that allowed for mapping certain group of properties to initialize lazily. In my cases I have classes describing images. I used blobs for storing

Re: [Hibernate] Patch: access via Field, not via Method if requested so

2003-08-15 Thread Michał Mosiewicz
>[...] > As it is known, Hibernate uses accessors (getters/setters) to > access object properties. This is noted as a RIGHT THING > in documentation, since it raises incapsulation. That's right, > but I have a few real-world examples that show that direct field > access can

Re: [Hibernate] Why serializable?

2003-08-14 Thread Michał Mosiewicz
>[...] > Blobs are not serializable because they are a pointer to space on the > database. So, you see, we couldn't cache them across transactions even if > we tried to. I ask my daughtes most favorable question: "Why couldn't we..." This pointer points to space that is readable, and serializable

[Hibernate] Why serializable?

2003-08-11 Thread Michał Mosiewicz
Why AbstractType.disassemble(..) returns Serializable? It fails with blob fields (ClassCastException). Which means that you can't use JCS cache with blob types. Of course, It's kind of strange that blobs are not serializable, but the fact is they are not. Regards, -- Mike -