Ill try and see if i can get it running with .net 3.5 but thats going
to take quite a but of doing. Im wondering, it worked with nhibernate
1.2, is it possible to use the call that was used in nhibernate 1.2 .
Actually we are now contemplating a radical change. Given the
complexity of our domain model classes and how we have our data and
business logic tightly coupled together , we are looking at creating a
separate data entity model and have some kind of mapper to move the
data to and from our domain model. I guess its kind of like using
nhibernate with Rockys CSLA framework. It means we have to do more
work but our domain objects are just really hard to proxy given there
complexity and they do a lot of interop to C++ and fortran so that
even adds more complexity. Im not sure what your thoughts are going
down this road.

thanks

scott

On Sep 3, 12:32 pm, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> Try running it on a .Net 3.5 machine wihtout SP1
>
> On Wed, Sep 3, 2008 at 1:50 PM, srf <[EMAIL PROTECTED]> wrote:
>
> > looking at it further it seems to be some generic issue , my table
> > class looks like this:
> >  public class Table : Container, ITable, ISerializable
> >   {
>
> >    public virtual void Set<T>(string colName, int row, Scalar<T>
> > dataVal) where T : IComparable<T>
> >      {
> >      }
>
> > }
>
> > It has a generic method even though the class isnt generic and it
> > mentioned that its expecting a generic class for the generic method.
> > Could it relate to this, if so are we doing something wrong be
> > defining a non generic class but having a generic method?
>
> > thanks
>
> > scott
>
> > On Sep 2, 12:50 pm, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> > > That is not something that I would expect to find on an entity.Off the
> > top
> > > of my head, no idea how DP would behave in this scenario, but I think it
> > > would emit AnyCPU assemblies.
> > > What happens when you are just calling this without any proxying? Does
> > this
> > > work on the 64bit machine?
>
> > > On Tue, Sep 2, 2008 at 2:48 PM, srf <[EMAIL PROTECTED]> wrote:
>
> > > > its one of our domain objects called "Table" (I could give you the
> > > > whole thing but its quite large). I noticed I could proxy other domain
> > > > objects but when I got to this one it gave me the error. The one
> > > > different thing about this table is that it has some interop entries
> > > > like this:
> > > >  /// <summary>
> > > >      /// Set the neccesary parameters of a C++ table
> > > >      /// </summary>
> > > >      /// <param name="tableID">ID of the table</param>
> > > >      /// <param name="columnID">ID of the column to be added</param>
> > > >      /// <param name="colIdx">The column index</param>
> > > >      [DllImport("Drms.Server.compute.domainmodel.datacontainers.dll",
> > > > EntryPoint = "TableAddColumn", ExactSpelling = false)]
> > > >      internal static extern void TableAddColumn(Int64 tableID, Int64
> > > > columnID, int colIdx);
>
> > > > could these be causing it? Is Dynamic proxy compiled with AnyCPU?
>
> > > > thanks
>
> > > > scott
>
> > > > On Sep 2, 11:10 am, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> > > > > What is the class that you are trying to proxy?
>
> > > > > On Tue, Sep 2, 2008 at 12:59 PM, srf <[EMAIL PROTECTED]> wrote:
>
> > > > > > I was trying to use Nhibernate 2.0 and was getting the following
> > error
> > > > > > related to proxying:
>
> > > > > > Message "An attempt was made to load a program with an incorrect
> > > > > > format. (Exception from HRESULT: 0x8007000B)"   string
> > > > > >   at System.Reflection.Emit.TypeBuilder._TermCreateClass(Int32
> > > > > > handle, Module module)
> > > > > >   at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock()
> > > > > >   at System.Reflection.Emit.TypeBuilder.CreateType()
> > > > > >   at
>
> > Castle.DynamicProxy.Generators.Emitters.AbstractTypeEmitter.BuildType()
> > > > > >   at
>
> > Castle.DynamicProxy.Generators.Emitters.AbstractTypeEmitter.BuildType()
> > > > > >   at
>
> > Castle.DynamicProxy.Generators.ClassProxyGenerator.GenerateCode(Type[]
> > > > > > interfaces, ProxyGenerationOptions options)
> > > > > >   at Castle.DynamicProxy.DefaultProxyBuilder.CreateClassProxy(Type
> > > > > > theClass, Type[] interfaces, ProxyGenerationOptions options)
> > > > > >   at Castle.DynamicProxy.ProxyGenerator.CreateClassProxyType(Type
> > > > > > baseClass, Type[] interfaces, ProxyGenerationOptions options)
> > > > > >   at Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type
> > > > > > targetType, Type[] interfaces, ProxyGenerationOptions options,
> > > > > > Object[] constructorArgs, IInterceptor[] interceptors)
> > > > > >   at Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type
> > > > > > targetType, Type[] interfaces, ProxyGenerationOptions options,
> > > > > > IInterceptor[] interceptors)
> > > > > >   at Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type
> > > > > > targetType, Type[] interfaces, IInterceptor[] interceptors)
> > > > > >   at
> > NHibernate.Proxy.Poco.Castle.CastleProxyFactory.GetProxy(Object
> > > > > > id, ISessionImplementor session)
>
> > > > > > We are running under 64 bit  , would we run into problems doing
> > > > > > proxying in a 64 bit environment. The proxying for Nhibernate 1.2
> > > > > > worked ok under 64 bit though.
>
> > > > > > thanks
>
> > > > > > scott
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to