2011-12-29 18 views
2

Я пытаюсь добавить виджет на сайт Orchard, и я создал новую часть контента, которая наследуется от ContentPartRecord. Он строит просто отлично, но когда я иду, чтобы запустить Orchard.exe или когда я просматриваю на сайте я получаю эту ошибку:Использование ContentPartRecord вызывает ошибку времени выполнения

Exception Details: NHibernate.MappingException: Association references unmapped class: System.string 

Вот мой класс:

using System.ComponentModel.DataAnnotations; 
using Orchard.ContentManagement; 
using Orchard.ContentManagement.Records; 
using System.Collections.Generic; 

namespace Hjn.Models 
{ 
public class PropertySearchRecord : ContentPartRecord 
{ 
    public virtual List<string> PropertyTypes { get; set; } 
    public virtual List<string> Locations { get; set; } 
    public virtual List<double> MinimumPrices { get; set; } 
    public virtual List<double> MaximumPrices { get; set; } 
} 

public class PropertySearchPart : ContentPart<PropertySearchRecord> 
{ 
    [Required] 
    public List<string> PropertyTypes 
    { 
     get { return Record.PropertyTypes; } 
     set { Record.PropertyTypes = value; } 
    } 

    [Required] 
    public List<string> Locations 
    { 
     get { return Record.Locations; } 
     set { Record.Locations = value; } 
    } 

    [Required] 
    public List<double> MinimumPrices 
    { 
     get { return Record.MinimumPrices; } 
     set { Record.MinimumPrices = value; } 

    } 

    [Required] 
    public List<double> MaximumPrices 
    { 
     get { return Record.MaximumPrices; } 
     set { Record.MaximumPrices = value; } 
    } 
} 
} 

Я довольно потерял с вот этот. Я могу опубликовать трассировку стека, если вы захотите. Просто дай мне знать. Благодаря!

+0

Похоже, что это те столбцы списка, которые запутывают его. –

ответ

Смежные вопросы