From: <anj...@t-...> - 2003-08-02 22:52:08
|
Hi Max, Am Samstag, 02.08.03, um 22:59 Uhr (Europe/Berlin) schrieb Anjo Krank: > David Teran has been adding a ERXBatchingDisplayGroup which qualifies > the fetched objects with some Frontbase specific code to support real > batching (with ordering and all). I don't know if it is finished, > though, but it should be easy to add support for other databases. > > And I guess it's a better solution that fetching the PKs, at least for > *really* large datasets and it is more transparent to use - after all, > you could use it in D2W with about one line of code... The line of code is: public ERD2WListPage(WOContext c) { super(c); [snip] takeValueForKey("displayGroup", new ERXBatchingDisplayGroup()); } and then every d2w page will use an ERXBatchingDisplayGroup instead of a WODisplayGroup. However, AFAICS, the implementation has a few problems: - relationship properties can't be sorted. This results in an "foo.bar is not reachable via entity Baz" error. As one might not be able to do this without fetching everything in the first place, this might not be so important. - sub-entities are not qualified properly. I just tested this with an entity that has "foo=1 and bar=2" as qualifying keys set in the model and the expression fails to "unbind" those keys. I get an exception EvaluateExpression failed: <com.webobjects.jdbcadaptor.MySQLPlugIn$MySQLExpression: "select count(*) FROM asset t0 WHERE (t0.assettypeid = ? AND t0.contenttypeid = ?)">: Next exception:SQL State:42000 -- error code: 1064 -- msg: Syntax error or access violation: You have an error in your SQL syntax near '? AND t0.contenttypeid = ?)' at line 1 This sucks heavily, as I use inheritance via qualifiers quite extensively and don't know where to look for a solution... Cheers, Anjo |