These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: "Input string was not in a correct format" when cf
PostPosted: Thu Aug 17, 2006 7:16 am 
Newbie

Joined: Thu Aug 17, 2006 7:08 am
Posts: 1
Hi,

All are in title...

Thx for help...

Olivier.



Hibernate version:
nhibernate

Mapping documents:
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.0" schema="dbo">
<class name="dal.DBModeleDocument, LB_CautionDirecte" table="MODELE_DOCUMENT">
<id name="Idmodeledoc" type="Decimal" column="ID_MODELEDOC">
<generator class="identity" />
</id>
<property name="Binmodeledoc" column="BIN_MODELEDOC" type="Byte()" />
<property name="Contenttypemodeledoc" column="CONTENTTYPE_MODELEDOC" type="String" />
<many-to-one name="Idtypedemande" column="ID_TYPE_DEMANDE" class="dal.DBTypeDemande, LB_CautionDirecte" />
<bag name="Mainlevees" inverse="true">
<key column="ID_MODELEDOC" />
<one-to-many class="dal.DBMainLevee, LB_CautionDirecte" />
</bag>
<property name="Nommodeledoc" column="NOM_MODELEDOC" type="String" />
<property name="Taillemodeledoc" column="TAILLE_MODELEDOC" type="Int64" />
</class>
</hibernate-mapping>

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:
FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +2753331
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +102
System.Int32.Parse(String s) +20
NHibernate.Type.TypeFactory.Basic(String name) in c:\net\nhibernate\nhibernate\src\NHibernate\Type\TypeFactory.cs:287
NHibernate.Type.TypeFactory.HeuristicType(String typeName) in c:\net\nhibernate\nhibernate\src\NHibernate\Type\TypeFactory.cs:356
NHibernate.Cfg.HbmBinder.GetTypeFromXML(XmlNode node) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\HbmBinder.cs:1152
NHibernate.Cfg.HbmBinder.BindSimpleValue(XmlNode node, SimpleValue model, Boolean isNullable, String path, Mappings mappings) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\HbmBinder.cs:513
NHibernate.Cfg.HbmBinder.PropertiesFromXML(XmlNode node, PersistentClass model, Mappings mappings) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\HbmBinder.cs:1341
NHibernate.Cfg.HbmBinder.BindRootClass(XmlNode node, RootClass model, Mappings mappings) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\HbmBinder.cs:435
NHibernate.Cfg.HbmBinder.BindRoot(XmlDocument doc, Mappings model) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\HbmBinder.cs:1594
NHibernate.Cfg.Configuration.AddValidatedDocument(XmlDocument doc) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:370
NHibernate.Cfg.Configuration.AddXmlReader(XmlTextReader hbmReader) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:1556
NHibernate.Cfg.Configuration.AddXmlFile(String xmlFile) in c:\net\nhibernate\nhibernate\src\NHibernate\Cfg\Configuration.cs:266

[MappingException: Input string was not in a correct format.]
Name and version of the database you are using:

The generated SQL (show_sql=true):

Object
using System;
namespace dal
{

///--------------------------------------------------------------------------------
///<summary>
///Persistent domain entity class representing 'DBModeleDocument' entities.
///</summary>
///<remarks>
///
///Mapping information:
///This class maps to the 'MODELE_DOCUMENT' table in the data source.
///</remarks>
///--------------------------------------------------------------------------------
public class DBModeleDocument
{
#region " : Generated Code Region "
//Private field variables

//Holds property values
private System.Decimal _idmodeledoc;
private System.Byte[] _binmodeledoc;
private System.String _contenttypemodeledoc;
private DBTypeDemande _idtypedemande;
private System.Collections.IList _mainlevees;
private System.String _nommodeledoc;
private System.Int64 _taillemodeledoc;

//Public properties
///--------------------------------------------------------------------------------
///<summary>
///Persistent primitive identity property.
///</summary>
///<remarks>
///This property is an identity property.
///The identity index for this property is '0'.
///This property accepts values of the type 'System.Decimal'.
///The accessibility level for this property is 'PublicAccess'.
///The accessibility level for the field '_idmodeledoc' that holds the value for this property is 'PrivateAccess'.
///
///Mapping information:
///The property maps to the column 'ID_MODELEDOC' in the data source.
///</remarks>
///--------------------------------------------------------------------------------
public System.Decimal Idmodeledoc
{
get
{
return _idmodeledoc;
}
}

///--------------------------------------------------------------------------------
///<summary>
///Persistent primitive property.
///</summary>
///<remarks>
///This property accepts values of the type 'System.Byte()'.
///The accessibility level for this property is 'PublicAccess'.
///The accessibility level for the field '_binmodeledoc' that holds the value for this property is 'PrivateAccess'.
///
///Mapping information:
///The property maps to the column 'BIN_MODELEDOC' in the data source.
///</remarks>
///--------------------------------------------------------------------------------
public System.Byte[] Binmodeledoc
{
get
{
return _binmodeledoc;
}
set
{
_binmodeledoc = value;
}
}

///--------------------------------------------------------------------------------
///<summary>
///Persistent primitive property.
///</summary>
///<remarks>
///This property accepts values of the type 'System.String'.
///The accessibility level for this property is 'PublicAccess'.
///The accessibility level for the field '_contenttypemodeledoc' that holds the value for this property is 'PrivateAccess'.
///
///Mapping information:
///The property maps to the column 'CONTENTTYPE_MODELEDOC' in the data source.
///</remarks>
///--------------------------------------------------------------------------------
public System.String Contenttypemodeledoc
{
get
{
return _contenttypemodeledoc;
}
set
{
_contenttypemodeledoc = value;
}
}

///--------------------------------------------------------------------------------
///<summary>
///Persistent one-many reference property.
///</summary>
///<remarks>
///This property accepts references to objects of the type 'DBTypeDemande'.
///This property is part of a 'OneToMany' relationship.
///The inverse property for this property is 'DBTypeDemande.Modeledocuments'.
///The accessibility level for this property is 'PublicAccess'.
///The accessibility level for the field '_idtypedemande' that holds the value for this property is 'PrivateAccess'.
///
///Mapping information:
///The property maps to the column 'ID_TYPE_DEMANDE' in the data source.
///</remarks>
///--------------------------------------------------------------------------------
public DBTypeDemande Idtypedemande
{
get
{
return _idtypedemande;
}
set
{
_idtypedemande = value;
}
}

///--------------------------------------------------------------------------------
///<summary>
///Persistent many-one reference property.
///</summary>
///<remarks>
///This property accepts multiple references to objects of the type 'DBMainLevee'.
///This property is part of a 'ManyToOne' relationship.
///The data type for this property is 'System.Collections.IList'.
///The inverse property for this property is 'DBMainLevee.Idmodeledoc'.
///This property inherits its mapping information from its inverse property.
///The accessibility level for this property is 'PublicAccess'.
///The accessibility level for the field '_mainlevees' that holds the value for this property is 'PrivateAccess'.
///This property is marked as Read-Only.
///
///Mapping information:
///This class maps to the 'MAIN_LEVEE' table in the data source.
///The property maps to the identity column 'ID_MODELEDOC' in the data source.
///</remarks>
///--------------------------------------------------------------------------------
public System.Collections.IList Mainlevees
{
get
{
return _mainlevees;
}
set
{
_mainlevees = value;
}
}

///--------------------------------------------------------------------------------
///<summary>
///Persistent primitive property.
///</summary>
///<remarks>
///This property accepts values of the type 'System.String'.
///The accessibility level for this property is 'PublicAccess'.
///The accessibility level for the field '_nommodeledoc' that holds the value for this property is 'PrivateAccess'.
///
///Mapping information:
///The property maps to the column 'NOM_MODELEDOC' in the data source.
///</remarks>
///--------------------------------------------------------------------------------
public System.String Nommodeledoc
{
get
{
return _nommodeledoc;
}
set
{
_nommodeledoc = value;
}
}

///--------------------------------------------------------------------------------
///<summary>
///Persistent primitive property.
///</summary>
///<remarks>
///This property accepts values of the type 'System.Int64'.
///The accessibility level for this property is 'PublicAccess'.
///The accessibility level for the field '_taillemodeledoc' that holds the value for this property is 'PrivateAccess'.
///
///Mapping information:
///The property maps to the column 'TAILLE_MODELEDOC' in the data source.
///</remarks>
///--------------------------------------------------------------------------------
public System.Int64 Taillemodeledoc
{
get
{
return _taillemodeledoc;
}
set
{
_taillemodeledoc = value;
}
}

#endregion //: Generated Code Region

//Add your synchronized custom code here:
#region " : Synchronized Custom Code Region "
#endregion //: Synchronized Custom Code Region

//Add your unsynchronized custom code here:
#region " : Unsynchronized Custom Code Region "



#endregion //: Unsynchronized Custom Code Region

}
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.