Log in


   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Prevent a field from being serialized

Pages: 1
LLBLGen Pro Runtime Framework
Prevent a field from being serialized

  Print all messages in this thread  
Poster Message


Joined on:
01-Oct-2004 22:58:25
67 posts
# Posted on: 05-May-2009 19:46:01.  
I have a table that stores an encrypted password in one of its columns. I'm using an Adapter scenario, with a server that handles data fetches and sends the data to the client using fast binary serialization.

The password needs to be accessible in the server application (so I need to include the column in my entity), but I don't want to send the field to the client, since the client does not need it.

I'm trying to figure out the best way to accomplish this with the llblgen entities. I thought about using a field filter to exclude this field whenever I do fetches on behalf of the client, but it seems like it would be difficult to enforce the use of the filter everywhere a fetch might load the object.

Is there a way to prevent llblgen from serializing this one field? Would I need to override SerializeOwnedData and DeserializeOwnedData to write/read all values except the password, without calling the base's methods?

Or does someone have a better idea on how to accomplish this goal?
Support Team

Guatemala City
Joined on:
28-Nov-2005 23:35:24
8098 posts
# Posted on: 06-May-2009 07:21:28.  
The way yo do (exclude fields at fetch) is ok.
You also could make a routine that clear the field before send it. Or you can send custom DTOs objects.

David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
Pages: 1  

Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.