I am trying to switch a table from being a many-to-one mapping to being many-to-many with an intermediate mapping table. However, when I switched it over and tried to do a query on it with NHibernate, it's giving me this error: "Interceptor.OnPrepareStatement(SqlString) returned null or empty SqlString."

My query was originally something more complex, but I switched it to a basic fetch all and I'm still having the problem:

Session.QueryOver<T>().Future();

It would seem to either be a problem in my model mapping files or something in my database.

Here are my model mappings:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="GBI.Core" namespace="GBI.Core.Models">

<class name="Market" table="gbi_Market">
    <id name="Id" column="MarketId">
        <generator class="identity" />
    </id>
    <property name="Name" />
    <property name="Url" />
    <property name="Description" type="StringClob" />
    <property name="Rating" />
    <property name="RatingComment" />
    <property name="RatingCommentedOn" />
    <many-to-one name="RatingCommentedBy" column="RatingCommentedBy" lazy="proxy"></many-to-one>
    <property name="ImageFilename" />
    <property name="CreatedOn" />
    <property name="ModifiedOn" />
    <property name="IsDeleted" />

    <many-to-one name="CreatedBy" column="CreatedBy" lazy="proxy"></many-to-one>
    <many-to-one name="ModifiedBy" column="ModifiedBy" lazy="proxy"></many-to-one>

    <set name="Content" where="IsDeleted=0 and ParentContentId is NULL" order-by="Ordering asc, CreatedOn asc, Name asc" lazy="extra">
        <key column="MarketId" />
        <one-to-many class="MarketContent" />
    </set>

    <set name="FastFacts" where="IsDeleted=0" order-by="Orderi
Edit
Report