|
From: Colin S. <col...@ex...> - 2004-05-04 11:53:01
|
I don't have the 1.0 spec handy here, but I'm pretty sure field-specific lazy loading is not part of the JDO spec. Kodo didn't have this feature when I worked with it back in late 2001/early 2002, but they've extended it a lot since then, so I wouldn't be that surprised if it supported it now. It's a bit of a bummer not being able to do it, since with the LOBs, that omission means you are forced to either load them all in via a transaparent LOB to string/byte mechanism, or use a non-transparent approach such as using the LobHandler, which has the added disadvantage that you can't use it to pass around the data once you are detached from the db. jürgen höller [werk3AT] wrote: >Isn't field-specific lazy loading a required feature of JDO? What does Kodo JDO offer in that respect, for example? Can you lazily load LOB fields in a database-independent manner with Kodo? > >Juergen > > >________________________________ > >Von: spr...@li... im Auftrag von Colin Sampaleanu >Gesendet: Mo 03.05.2004 20:18 >An: spr...@li... >Betreff: Re: [Springframework-developer] Exposing LOB support to Jdbc Object layer > > > >jürgen höller [werk3AT] wrote: > > > >>That looks interesting! I didn't think about overloaded SqlParameter constructors before; that definitely makes sense. How to you handle the LobCreator lifecycle there? LobCreator.close needs to be invoked after PreparedStatement execution (but before transaction completion). >> >>BTW, I've recently refined the LOB support for jdbc.core: There are AbstractLobCreatingPreparedStatementCallback and AbstractLobStreamingResultSetExtractor classes now (don't we love our class naming patterns!), to make LOB handling via JdbcTemplate more convenient. Have a look at imagedb's DefaultImageDatabase class for usage examples. >> >>There's also a ClobStringType class in our Hibernate support, for storing String properties in CLOB fields. That allows to transparently store long Strings in Oracle CLOBs respectively MySQL text fields, for example. It registers a TransactionSynchronization for the LobCreator.close call, so just works within a Spring transaction. >> >> >> >> >I've been trying to convince Gavin for ages to make it possible to lazy >load columns (not just collections), which would make stuff like >ClobStringType a lot more useful. Right now if you have a table with a >LOB column and use something like ClobStringType you pay the price and >load it even if you don't need it. > >Oh well... > > |