Accessing entity data from inside a type converter

Posts   
 
    
rboarman
User
Posts: 83
Joined: 01-Feb-2005
# Posted on: 15-Jun-2009 20:33:01   

Hello,

My apologies if this question is covered elsewhere. I searched but could not find any information.

Is it possible to access entity data from within a type converter? I need to read the value of another field to control how my type converter compresses/decompresses some data. The value of the second field will contain the type of compression used and thus be needed to decompress the data.

My guess is that the answer is no. In that case I will need to figure out another way to handle my requirements.

Thank you.

Rick

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 16-Jun-2009 03:33:43   

Indeed, not possible AFAIK. Seems like you should implement some business logic outside the typeConverter to compress/decompress.

What does your typeconverter do? Is a TypeA-to-TypeB converter or a TypeADescompressed-to-TypeACompressed?

David Elizondo | LLBLGen Support Team
rboarman
User
Posts: 83
Joined: 01-Feb-2005
# Posted on: 16-Jun-2009 05:26:40   

It's TypeADescompressed-to-TypeACompressed. What I plan instead, is to wrap the compressed data something like this:

<?xml version="1.0" ?> <Payload> <Data CompressionType="GZipStream">BAAAAB+LCAAAAAAABADtvQdgHEmWJS</Data> </Payload>

I was going to store the compression type in a seperate field.

Thanks,

Rick