Hi there,

I have two, hopefully simple, questions.

1) Is it possible to activate compression on fields in 4.0? Something like the attribute [StorageValueModifier(typeof(Compressor))] in 3.9.5?

2) How do I set a field to be translatable in 4.0?

Best regards, Rune

This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by Rune Højsgaard.

asked Jul 20 '09 at 14:03

Editor's gravatar image

Editor
46156156157


One Answer:

1) No. Moreover, we don't support serializable objects any more. The decision to leave this for developers is made because actually it's really rather simple to achieve this. So most likely we'll just provide a pattern for this in Wiki. Basically, you should create a pair of "backing" persistent property (private / internal) and public non-persistent property to implement this. Non-persistent property must implement all the compression / decompression logic. If this logic is extracted to separate types, the code for such a public property must be really simple:

get { return MySerializer.Deserialize(MyCompressor.Decompress(Imagebacking)); } 
  set { ImageBacking = MyCompressor.Compress(MySerializer.Serialize(value)); }

2) We don't support translatable fields yet. Moreover, we plan to implement them differently, see http://code.google.com/p/dataobjectsdot ... tail?id=90

answered Jul 20 '09 at 18:44

Alex%20Yakunin's gravatar image

Alex Yakunin
29714412

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA