cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jerome moliere" <jerome.moli...@gmail.com>
Subject Re: Hook in the cayenne internals
Date Mon, 02 Apr 2007 09:02:24 GMT
2007/4/2, jerome moliere <jerome.moliere@gmail.com>:
>
> Hi all,
> I'd like to show on a simple test the Cayenne equivalent for the Hibernate
> UserType, that is to say
> a way to map some SQL types with some user provided code...
> Example given is : my customers use sybase image type to store XML gzipped
> huge files...
> I'd like to be able to be able to store/read the XML transparently...Image
> type is a detail of implementation
> org.apache.cayenne.access.types.ExtendedType
> seems to be the Cayenne solution but there are no big details on this
> subject...
>
> Is the Cayenne source code my only source ?
> Moreover if you have UML sequence diagrams and other conception documents
> on Cayenne, I'd very happy to read them..



I 'll try to give your more clues...
In fact if I understand the ExtendedType machanism as plugged in the
DBadapters, a question still remains..
Let's imagine a small table schema:

(it will use a Postgresql syntax, with the bytea binary type)

CREATE TABLE PAITINGS_TBL(painting_id int primary key,painting_data bytea);

CREATE TABLE ARTISTS_BIO(artist_id int primary key, artist_text_bio bytea);


in this schema 2 tables with 2 BLOB fields, the first one is simply the JPEG
while the second is a long text with all the artist bio...

The extendedtype could permit me to change the Cayenne behavior but for all
bytea fields isn't it ?
I dont want to manage a JPEG in the same fashion as the authors bio...


Thanks for any help
cheers
jerome


-- 
Jerome Moliere - Mentor/J
http://romjethoughts.blogspot.com/
auteur Eyrolles

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message