I'd prefer using the NH trunk itself, in case I want to submit a fix
patch with bug reports.
I changed the config file
<property
name="connection.driver_class">NHibernate.Driver.SqlServerCeDriver</
property>
<property
name="dialect">NHibernate.Dialect.MsSqlCeDialect</
property>
<property name="connection.connection_string">Data
Source=C:
\Documents and Settings\Cowboy\Mes documents\Visual Studio
2008\Databases\MyDatabase#1.sdf</property>
I have this error now :
NHibernate.Test.Ado.BatcherFixture:
La référence d'objet n'est pas définie à une instance d'un objet.
(object reference does not reference an object instance)
Stacktrace:
à NHibernate.Tool.hbm2ddl.SchemaExport..ctor(Configuration cfg) dans C:
\Documents and Settings\Cowboy\Mes documents\Visual Studio
2008\Projects\NHibernate\nhibernate\src\NHibernate\Tool\hbm2ddl
\SchemaExport.cs:ligne 36
à NHibernate.Test.TestCase.DropSchema() dans C:\Documents and Settings
\Cowboy\Mes documents\Visual Studio 2008\Projects\NHibernate\nhibernate
\src\NHibernate.Test\TestCase.cs:ligne 236
à NHibernate.Test.TestCase.TestFixtureTearDown() dans C:\Documents and
Settings\Cowboy\Mes documents\Visual Studio 2008\Projects\NHibernate
\nhibernate\src\NHibernate.Test\TestCase.cs:ligne 118
I tested with the default option
<property
name="connection.provider">NHibernate.Test.DebugConnectionProvider,
NHibernate.Test</property>
and this one :
<property
name="connection.provider">NHibernate.Connection.DriverConnectionProvider,
NHibernate</property>
On Aug 18, 9:58 pm, Tuna Toksoz <[email protected]> wrote:
> IF you are notexperienced with SVN there is another
> way.http://nhforge.org/blogs/nhibernate/archive/2008/10/04/the-best-way-t...
> <http://nhforge.org/blogs/nhibernate/archive/2008/10/04/the-best-way-t...>
>
> Tuna Toksöz
> Eternal sunshine of the open source mind.
>
> http://devlicio.us/blogs/tuna_toksozhttp://tunatoksoz.comhttp://twitter.com/tehlike
>
> On Tue, Aug 18, 2009 at 10:18 PM, Nelson <[email protected]> wrote:
>
> > Hum installed VS2008 Express (w/ SQL Server Compact), NUnit, NAnt,
> > TortoiseSVN.
> > After compiling with NAnt, I started NUnit and ran NHibernate.Test.
> > Most test fails because of this error :
>
> > NHibernate.Test.Ado.BatcherFixture (TestFixtureSetUp):
> > NHibernate.HibernateException : Could not open connection to: Server=
> > (local);initial catalog=nhibernate;Integrated Security=SSPI
> > ----> System.Data.SqlClient.SqlException : Une erreur liée au réseau
> > ou spécifique à l'instance s'est produite lors de l'établissement
> > d'une connexion à SQL Server. Le serveur est introuvable ou n'est pas
> > accessible. Vérifiez que le nom de l'instance est correct et que SQL
> > Server est configuré pour autoriser les connexions distantes.
> > (provider: Fournisseur de canaux nommés, error: 40 - Impossible
> > d'ouvrir une connexion à SQL Server)
>
> > Any help ?
>
> > On Aug 12, 8:46 pm, Chris Nicola <[email protected]> wrote:
> > > I believe this covers that (Tuna, feel free to shoot me if it was about
> > > something completely different, I haven't read it in detail yet ;-))
>
> > >http://tunatoksoz.com/post/Contributing-to-OSS-e28093-Creating-a-test...
>
> > > Chris
>
> > > On Wed, Aug 12, 2009 at 10:51 AM, Nelson <[email protected]>
> > wrote:
>
> > > > Could I have some guidelines or example of a good test project? How
> > > > can I submit it to community?
>
> > > > On Jul 29, 8:45 pm, Davy Brion <[email protected]> wrote:
> > > > > create a patch with a failing test and we'd be happy to look at the
> > > > > problem... and try to fix it of course
>
> > > > > On Tue, Jul 28, 2009 at 9:54 PM, Nelson <[email protected]>
> > wrote:
>
> > > > > > Nobody to confirm that bug? I do not want to add it to JIRA without
> > > > > > nobody validating it.
> > > > > > Is the previous message unclear?
>
> > > > > > On Jul 27, 9:06 pm, Nelson <[email protected]> wrote:
> > > > > > > Hello open people,
>
> > > > > > > I think I founded a bug in NHibernate 2.1.
> > > > > > > Before reading that message and throwing me stones, please know
> > that
> > > > I
> > > > > > > founded it at work and I'm pretty tired and lazy now. So if I am
> > not
> > > > > > > giving enough details, please don't kill me! I prefered posting
> > > > > > > something before forgetting about it.
>
> > > > > > > *** Observations ***
>
> > > > > > > The bug happened when saving/loading a collection of element of
> > > > > > > nullable .net types.
> > > > > > > When saving a List<double?>, mapped as a list of element
> > > > > > > (kindof this :
> > > > > > > <list name="toto">
> > > > > > > <key.../>
> > > > > > > <index .../>
> > > > > > > <element ../> <<< a 'double?'
> > > > > > > </list>
> > > > > > > containing {9,null, null,8,null}, NHibernate insert tuples <0,9>,
> > > > > > > <3,8>, not inserting null values (which is great).
>
> > > > > > > When loading it inserts null values into the list (cool). <<
> > > > > > > cockroach
>
> > > > > > > *** Why cockroach? ***
>
> > > > > > > Here is the ReadFrom function from
> > > > > > > NHibernate.Collection.PersistentList.cs
>
> > > > > > > public override object ReadFrom(IDataReader rs,
> > > > > > ICollectionPersister
> > > > > > > role, ICollectionAliases descriptor, object owner)
> > > > > > > {
> > > > > > > object element = role.ReadElement(rs,
> > owner,
> > > > > > > descriptor.SuffixedElementAliases, Session);
> > > > > > > int index = (int) role.ReadIndex(rs,
> > > > > > > descriptor.SuffixedIndexAliases, Session);
>
> > > > > > > //pad with nulls from the current last
> > > > element up
> > > > > > to the new index
> > > > > > > for (int i = list.Count; i <= index; i++)
> > > > > > > {
> > > > > > > list.Insert(i, DefaultForType);
> > > > > > > }
>
> > > > > > > list[index] = element;
> > > > > > > return element;
> > > > > > > }
>
> > > > > > > See that line ? "list.Insert(i, DefaultForType);" Default for
> > double?
> > > > > > > is null. So we do have list.Insert(i,null) here. What is 'list'?
>
> > > > > > > public class PersistentList : AbstractPersistentCollection, IList
> > > > > > > {
> > > > > > > protected IList list;
>
> > > > > > > An IList, which is initialized in the constructor by
>
> > > > > > > public PersistentList(ISessionImplementor session, IList list) :
> > base
> > > > > > > (session)
> > > > > > > {
> > > > > > > this.list = list;
> > > > > > > SetInitialized();
> > > > > > > IsDirectlyAccessible = true;
> > > > > > > }
>
> > > > > > > So the concrete code, in case of List<double?> is
>
> > > > > > > IList list = new List<double?>();
>
> > > > > > > followed by
>
> > > > > > > list.Add(i,null) << an exception is thrown cuz List<double?>
> > checks
> > > > if
> > > > > > > null is a double? and it says it is not.
>
> > > > > > > Sorry for the lazy and badly written message in English. I'm a
> > > > monkey,
> > > > > > > it is difficult for us monkey to speak English.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---