SF5: OpenAccess.Metadata.Fluent.StringPropertyConfiguration&

Posted by Community Admin on 04-Aug-2018 14:54

SF5: OpenAccess.Metadata.Fluent.StringPropertyConfiguration' does not contain a definition for 'IsLongText'?

All Replies

Posted by Community Admin on 23-Aug-2012 00:00

I'm running SF5 and have a custom module which includes a string field whose length is greater than 255 characters.  In my fluent mapping I'm trying to do the following:

curriculumDbDoc.HasProperty(d => d.Description).IsLongText(this.Context).IsNotNullable();

However, Intellisense is not showing the IsLongText as a member method and I get the following compiler error:

'Telerik.OpenAccess.Metadata.Fluent.StringPropertyConfiguration' does not contain a definition for 'IsLongText' and no extension method 'IsLongText' accepting a first argument of type 'Telerik.OpenAccess.Metadata.Fluent.StringPropertyConfiguration' could be found (are you missing a using directive or an assembly reference?) C:\Program Files (x86)\Telerik\Sitefinity 4.3\Projects\NLG Sitefinity Site\NLG Sitefinity Site\Modules\CurriculumDbDoc\Data\CurriculumDbDocFluentMetaDataSource.cs

What am I missing?

--Steve

Posted by Community Admin on 25-Aug-2012 00:00

Can I assume that the IsLongText method was replaced with the HasColumnType("varchar(max)") method:

curriculumDbDoc.HasProperty(d => d.Description).HasColumnType("varchar(max)");

Again, gotta say the documentation needs a lot of work.  Searching the full docs for "IsLongText: produces 0 results.  Searching for "HasColumnType" returns 1 result: "How to create a Testimonials Intra-site module - Creating the fluent mappings" which includes some code where HasColumnType("varchar(max)") method is used but makes no mention of its usage, permitted values, etc.  Frankly, I expect more for a product in this price range.

--Steve

Posted by Community Admin on 28-Aug-2012 00:00

Hello SteveV,

 The IsLongText method is still there but please note that this is an extension method provided by sitefinity and not OpenAccess. As such you will need to include the Telerik.Sitefinity.Model namespace in order to use it without compilation errors.
The HasColumnType method comes from the OpenAccess API and is used to explicitly specify the type to which your column will be mapped. Basically both methods should result in the same behaviour.

Regards,
Petar
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed