{"ORA-00928: missing SELECT keyword\n" } in insert command!
error message :
{"could not insert: [TSSDataAccess.DTO.SuggesterInfoDTO#1][SQL: INSERT INTO SUGGESTERINFO (index, fullName, personelNo, education, staff, organizationalUnit, age, precedent, collaborationPercent, suggestionid, id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]" }
what do you think about this?!!!
dto classes:
SuggestionDTO :
Code:
using System;
using System.Collections;
namespace TSSDataAccess.DTO
{
/// <summary>
/// Summary description for SuggestionForm.
/// </summary>
public class SuggestionDTO : GenericDTO
{
public SuggestionDTO()
{
//
// TODO: Add constructor logic here
//
}
public SuggestionDTO(string _title, DateTime _creationTime, string _currentMethodDescription, string _currentMethodDifficulty, string _suggestedMethodDescription, string _suggestedMethodBenefits, IList _suggesters, IList _results, IList _attachments, string _thriftPrice)
{
this._title = _title;
this._creationTime = _creationTime;
this._currentMethodDescription = _currentMethodDescription;
this._currentMethodDifficulty = _currentMethodDifficulty;
this._suggestedMethodDescription = _suggestedMethodDescription;
this._suggestedMethodBenefits = _suggestedMethodBenefits;
this._suggesters = _suggesters;
this._results = _results;
this._attachments = _attachments;
this._thriftPrice = _thriftPrice;
}
public enum Status
{
Draft = 1,
Saved = 2
}
private string _title;
private DateTime _creationTime;
private string _currentMethodDescription;
private string _currentMethodDifficulty;
private string _suggestedMethodDescription;
private string _suggestedMethodBenefits;
private IList _suggesters;
private IList _results;
private IList _attachments;
private string _thriftPrice;
private string _otherBenefits;
private Status _status;
public virtual string title
{
get { return _title; }
set
{
_title = value;
if(_title == string.Empty)
_title = null;
}
}
public virtual DateTime creationTime
{
get { return _creationTime; }
set { _creationTime = value; }
}
public virtual string currentMethodDescription
{
get { return _currentMethodDescription; }
set
{
_currentMethodDescription = value;
if(_currentMethodDescription == string.Empty)
_currentMethodDescription = null;}
}
public virtual string currentMethodDifficulty
{
get { return _currentMethodDifficulty; }
set
{
_currentMethodDifficulty = value;
if(_currentMethodDifficulty == string.Empty)
_currentMethodDifficulty = null; }
}
public virtual string suggestedMethodDescription
{
get { return _suggestedMethodDescription; }
set
{
_suggestedMethodDescription = value;
if(_suggestedMethodDescription == string.Empty)
_suggestedMethodDescription = null;}
}
public virtual string suggestedMethodBenefits
{
get { return _suggestedMethodBenefits; }
set
{
_suggestedMethodBenefits = value;
if(_suggestedMethodBenefits == string.Empty)
_suggestedMethodBenefits = null; }
}
public virtual IList suggesters
{
get { return _suggesters; }
set { _suggesters = value; }
}
public virtual IList results
{
get { return _results; }
set { _results = value; }
}
public virtual IList attachments
{
get { return _attachments; }
set { _attachments = value; }
}
public virtual string thriftPrice
{
get { return _thriftPrice; }
set
{
_thriftPrice = value;
if(_thriftPrice == string.Empty)
_thriftPrice = null; }
}
public virtual string otherBenefits
{
get { return _otherBenefits; }
set
{
_otherBenefits = value;
if(_otherBenefits == string.Empty)
_otherBenefits = null; }
}
public virtual int status
{
get { return (int)_status; }
set { _status = (Status)value; }
}
public virtual Status get_Status()
{
return _status;
}
public virtual void set_Status(Status status)
{
_status = status;
}
}
}
SuggesterInfoDTO :
Code:
using System;
namespace TSSDataAccess.DTO
{
/// <summary>
/// Summary description for SuggesterInfoDTO.
/// </summary>
public class SuggesterInfoDTO : GenericDTO
{
public SuggesterInfoDTO()
{
//
// TODO: Add constructor logic here
//
}
//
// public SuggesterInfoDTO(int _index, string _fullName, string _personelNo, string _education, string _staff, string _organizationalUnit, string _age, string _precedent, int _collaborationPercent)
// {
// this._index = _index;
// this._fullName = _fullName;
// this._personelNo = _personelNo;
// this._education = _education;
// this._staff = _staff;
// this._organizationalUnit = _organizationalUnit;
// this._age = _age;
// this._precedent = _precedent;
// this._collaborationPercent = _collaborationPercent;
// }
private int _index;
private string _fullName;
private string _personelNo;
private string _education;
private string _staff;
private string _organizationalUnit;
private string _age;
private string _precedent;
private int _collaborationPercent;
private SuggestionDTO _suggestion;
public virtual int index
{
get { return _index; }
set { _index = value; }
}
public virtual string fullName
{
get { return _fullName; }
set
{
_fullName = value;
if(_fullName == string.Empty)
_fullName = null; }
}
public virtual string personelNo
{
get { return _personelNo; }
set
{
_personelNo = value;
if(_personelNo == string.Empty)
_personelNo = null; }
}
public virtual string education
{
get { return _education; }
set
{
_education = value;
if(_education == string.Empty)
_education = null; }
}
public virtual string staff
{
get { return _staff; }
set
{
_staff = value;
if(_staff == string.Empty)
_staff = null; }
}
public virtual string organizationalUnit
{
get { return _organizationalUnit; }
set
{
_organizationalUnit = value;
if(_organizationalUnit == string.Empty)
_organizationalUnit = null;}
}
public virtual string age
{
get { return _age; }
set
{
_age = value;
if(_age == string.Empty)
_age = null; }
}
public virtual string precedent
{
get { return _precedent; }
set
{
_precedent = value;
if(_precedent == string.Empty)
_precedent = null; }
}
public virtual int collaborationPercent
{
get { return _collaborationPercent; }
set { _collaborationPercent = value; }
}
public virtual SuggestionDTO suggestion
{
get { return _suggestion; }
set { _suggestion = value; }
}
}
}
SuggestionResultDTO :
Code:
using System;
namespace TSSDataAccess.DTO
{
/// <summary>
/// Summary description for ImprovementDTO.
/// </summary>
public class SuggestionResultDTO : GenericDTO
{
public SuggestionResultDTO()
{
//
// TODO: Add constructor logic here
//
}
public enum Type
{
Thrift = 1,
Improvement = 2,
correction = 3,
addition = 4
}
private string _title;
private Type _type;
public virtual string title
{
get { return _title; }
set
{
_title = value;
if(_title == string.Empty)
_title = null;
}
}
public virtual int type
{
get { return (int)_type; }
set { _type = (Type)value; }
}
}
}
and related mapping files:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="TSSDataAccess.DTO.SuggestionDTO, TSSDataAccess" table="suggestion" dynamic-update="true">
<id name="id" column="id" unsaved-value="0">
<generator class="increment">
</generator>
</id>
<property name="title" column="title" not-null="false" length="512" />
<property name="creationTime" column="CREATIONTIME" not-null="false" type="DateTime" />
<property name="currentMethodDescription" column="currentMethodDescription" not-null="false" />
<property name="currentMethodDifficulty" column="currentMethodDifficulty" not-null="false" />
<property name="suggestedMethodDescription" column="suggestedMethodDescription" not-null="false" />
<property name="suggestedMethodBenefits" column="suggestedMethodBenefits" not-null="false" />
<property name="thriftPrice" column="thriftPrice" not-null="false" length="1024" />
<property name="otherBenefits" column="otherBenefits" not-null="false" length="1024" />
<bag name="results" table="suggestion_mm_result" lazy="false" cascade="all">
<key>
<column name="suggestionid" not-null="true"/>
</key>
<many-to-many class="TSSDataAccess.DTO.SuggestionResultDTO, TSSDataAccess">
<column name="resultid" not-null="true"/>
</many-to-many>
</bag>
<bag name="suggesters" cascade="all">
<key column="suggestionid"/>
<one-to-many class="TSSDataAccess.DTO.SuggesterInfoDTO, TSSDataAccess"/>
</bag>
</class>
</hibernate-mapping>
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="TSSDataAccess.DTO.SuggesterInfoDTO, TSSDataAccess" table="SUGGESTERINFO" dynamic-update="true">
<id name="id" column="id" unsaved-value="0">
<generator class="increment">
</generator>
</id>
<property name="index" column="index" not-null="false" />
<property name="fullName" column="fullName" not-null="false" length="512" />
<property name="personelNo" column="personelNo" not-null="false" length="512" />
<property name="education" column="education" not-null="false" />
<property name="staff" column="staff" not-null="false" length="512" />
<property name="organizationalUnit" column="organizationalUnit" not-null="false" length="512" />
<property name="age" column="age" not-null="false" />
<property name="precedent" column="precedent" not-null="false" />
<property name="collaborationPercent" column="collaborationPercent" not-null="false" />
<many-to-one name="suggestion" class="TSSDataAccess.DTO.SuggestionDTO, TSSDataAccess" column="suggestionid" cascade="none" unique="false"/>
</class>
</hibernate-mapping>
Code:
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="TSSDataAccess.DTO.SuggestionResultDTO, TSSDataAccess" table="suggestionresult" dynamic-update="true">
<id name="id" column="id" unsaved-value="0">
<generator class="increment">
</generator>
</id>
<property name="title" column="title" not-null="false" />
<property name="type" column="type" not-null="false" />
</class>
</hibernate-mapping>