Hi,
I was in the process of exporting a schema. However it gave me an error like this during runtime:
"Syntax error near the keyword 'Group'"
Any further details were not provided and I was unable to extract further info from the stackrace. I can't even tell if it refers to a class or a mapping file.
As far as I am able to tell the mapping files look ok.
Group.hbm.xml:
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" assembly="Logic"
namespace="SymphonyCMS.Logic">
<class name="Group" table="Group" lazy="true">
<id name="_id" column="id" access="field" type="Int32">
<generator class="native" />
</id>
<property name="_name" column="name" type="String" access="field"
not-null="true" unique="true" />
<set name="_userMembers" table="User_Group" access="field" lazy="true">
<key column="group_id" />
<many-to-many class="User" column="user_id" />
</set>
<set name="_permissions" table="Permission" access="field" lazy="true" cascade="all">
<key column="group_id" />
<one-to-many class="Permission" />
</set>
</class>
</hibernate-mapping>
User.hbm.xml:
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" assembly="Logic"
namespace="SymphonyCMS.Logic">
<class name="User" table="User" lazy="true">
<id name="_id" column="id" type="Int32" access="field">
<generator class="native" />
</id>
<property name="_userName" column="userName" type="String" access="field"
not-null="true" unique="true" />
<property name="_password" column="password" type="String" access="field" />
<property name="_firstName" column="firstName" type="String" access="field" />
<property name="_lastName" column="lastName" type="String" access="field" />
<property name="_emailAddress" column="emailAddress" type="String" access="field" />
<set name="_groups" table="User_Group" access="field" lazy="true">
<key column="user_id" />
<many-to-many class="Group" column="group_id" />
</set>
</class>
</hibernate-mapping>
Permission.hbm.xml:
Code:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" assembly="Logic"
namespace="SymphonyCMS.Logic">
<class name="Permission" table="Permission" lazy="true">
<id name="_id" column="id" type="Int32" access="field">
<generator class="native" />
</id>
<many-to-one name="_group" column="group_id" access="field" />
<many-to-one name="_role" column="role_id" access="field" />
</class>
</hibernate-mapping>
These are all the mapping files that have something to do with groups. Hope anyone will be able to enlighten me.
Regards,
Dirk Louwers