Storing byte array > 8000 bytes using nhibernate

Topics: Core, Customizing Orchard, Troubleshooting, Writing modules
Apr 20, 2012 at 10:06 AM

Anyone know how I can store over 8000 bytes of data in an orchard record?

As in what do I need to specify at the schema builder?

(if it matters : the record is not a content record)

Apr 26, 2012 at 7:28 AM
Edited Apr 26, 2012 at 7:28 AM

Doesn't anyone have a clue? :/

I'm storing this data in a MongoDB db now (using GridFS) but this is overkill for my actual needs.

Coordinator
Apr 26, 2012 at 2:45 PM

You need to annotate the Record's property with [StringLengthMax] and also to update the SchemaBuilder call with .Unlimited(). You will find extensive example throughout the code.

Apr 26, 2012 at 2:50 PM
sebastienros wrote:

You need to annotate the Record's property with [StringLengthMax] and also to update the SchemaBuilder call with .Unlimited(). You will find extensive example throughout the code.

Isn't that only for strings? I need to store byte[]s.

I could base64 encode it ofc, but that would just be wasting space.

Coordinator
Apr 26, 2012 at 4:35 PM

Sorry, I didn't see it was on byte[] ... It sounds like am already submitted bug though ... Can you file another one if you can't find it ?

Apr 26, 2012 at 4:39 PM
sebastienros wrote:

Sorry, I didn't see it was on byte[] ... It sounds like am already submitted bug though ... Can you file another one if you can't find it ?

Didn't find anything similar (searched for 'byte') so here it is: http://orchard.codeplex.com/workitem/18641