From: SourceForge.net <no...@so...> - 2003-03-04 05:37:00
|
Patches item #688610, was opened at 2003-02-18 11:45 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428710&aid=688610&group_id=40712 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Konstantin Dmitriev (kdmitriev) Assigned to: Nobody/Anonymous (nobody) Summary: Fetch profiles Initial Comment: Here's my code for fetch profiles. No test case is currently developed (though I have my own). I hope you can test on your own model ---------------------------------------------------------------------- >Comment By: Konstantin Dmitriev (kdmitriev) Date: 2003-03-04 05:47 Message: Logged In: YES user_id=693406 Cameron Certainly, that makes sence. I'm looking for porting the functionality of Fetcher to SessionFactory (global fecth profiles) and Session (session-level fetch profiles) if community approves this patch. Package cirrus.hibernate.fetches is just a temporal package. ---------------------------------------------------------------------- Comment By: Cameron Braid (cameronbraid) Date: 2003-03-03 16:41 Message: Logged In: YES user_id=196175 Whoops... Sorry, I just noticed that this example uses sequences... I don't have a database tha t supports sequences. I can look into porting it across to mysql. ---------------------------------------------------------------------- Comment By: Cameron Braid (cameronbraid) Date: 2003-03-03 16:24 Message: Logged In: YES user_id=196175 Sorry.. I have been busy the last few days. I plan to set this Fetch Profile up within the next few days. One thing that I may need that I don't think that your API does. I will want to be able to have different fetch profiles for each query. ie instead of using a static Fetcher, I will need to have an instance of the Fetcher that I can configure, and execute. (possibly reuse). This way I can generate differnet object graphs for the same query ... ie query 1 requires Product, productdescriptions ie query 2 requires Product, productdescriptions, productgroup, productEmployees does this make sence ? ---------------------------------------------------------------------- Comment By: Konstantin Dmitriev (kdmitriev) Date: 2003-03-03 08:48 Message: Logged In: YES user_id=693406 Cameron If you got some results from running test cases, could you please share your opinions on fetch profiles? I would be VERY appreciated! Many thanx in advance Best regards Konstantin Dmitriev ---------------------------------------------------------------------- Comment By: Konstantin Dmitriev (kdmitriev) Date: 2003-03-03 08:45 Message: Logged In: YES user_id=693406 Hello Max Thank you for porting the code to hibernate2 QueryTranslator is used for 2 purposes: to retreive aliases from the query (So that generated aliases do not interfere with existing), and to retreive FROM clause and SELECT clause. Fetcher will then append additional classes and conditions to them. ---------------------------------------------------------------------- Comment By: Max R. Andersen (maxcsaucdk) Date: 2003-03-01 21:20 Message: Logged In: YES user_id=18119 I've just changed this code to be compilable under hibnerate2. Unfortunately I've not been able to run any tests (yet :), but I thought someone might find it interesting to try under hibnerate2 - and that should be possible now. And just a small question... there is an QueryTranslator in the code - is this fetcher code still dependent on some speciel queyr syntax or is the code just for finding which classes that is being referenced ? ---------------------------------------------------------------------- Comment By: Cameron Braid (cameronbraid) Date: 2003-02-28 12:42 Message: Logged In: YES user_id=196175 that is most appreciated. Thanks ---------------------------------------------------------------------- Comment By: Konstantin Dmitriev (kdmitriev) Date: 2003-02-28 08:39 Message: Logged In: YES user_id=693406 SQL scripts to import test data ---------------------------------------------------------------------- Comment By: Cameron Braid (cameronbraid) Date: 2003-02-27 14:18 Message: Logged In: YES user_id=196175 I would like to try this patch. Though to do so I will need to insert a heap of data.. Do you have a dataset that can be added to the patch ? I suggest that you use DBUnit's flat xml data set as they are quite easy to export / import. ---------------------------------------------------------------------- Comment By: Konstantin Dmitriev (kdmitriev) Date: 2003-02-21 08:51 Message: Logged In: YES user_id=693406 Sorry about one-to-one. works now ---------------------------------------------------------------------- Comment By: Konstantin Dmitriev (kdmitriev) Date: 2003-02-20 05:49 Message: Logged In: YES user_id=693406 Hello Chris 1. According to Max R. Andersen's request, fetch profiles are defined in a way similar to sessions.setClassFectchProfiles (class1, "property1, property2"); i.e. not in the query 2. The whole thing is not about transparent eager loading lazy-loading proxies. It's about avoiding N+1. Quite different. I suggest you have a look at the patch and test cases Thank you very much for your feedback Best regards, Konstantin Dmitriev ---------------------------------------------------------------------- Comment By: Chris Nokleberg (herbyderby) Date: 2003-02-19 21:41 Message: Logged In: YES user_id=594737 Instead of parsing queries to determine what fields need to be fetched, I suggest that fetch profiles only be allowed for lazy-loading proxies. Accesses to the underlying getters could be intercepted, mapped to a profile, and loaded if necessary. Basically breaking up a lazy entity into distinct subsets of properties, each of which get loaded independently just-in-time. ---------------------------------------------------------------------- Comment By: Konstantin Dmitriev (kdmitriev) Date: 2003-02-19 13:53 Message: Logged In: YES user_id=693406 - added support for Maps - added support for Collections of values - various mappings added to the test model: list, map, bag, collection of values, one-to-one, many-to-many, component one-to-one present a problem, because lazy load is not supported ---------------------------------------------------------------------- Comment By: Konstantin Dmitriev (kdmitriev) Date: 2003-02-18 12:38 Message: Logged In: YES user_id=693406 Now with the test case. It's for Oracle (Is it a problem?) ---------------------------------------------------------------------- Comment By: Konstantin Dmitriev (kdmitriev) Date: 2003-02-18 12:28 Message: Logged In: YES user_id=693406 Where is the archive? Strange! Attaching again ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=428710&aid=688610&group_id=40712 |