I tried to use int instead of string and it did not work either.

No that, as per my previous comment, if I create the type at compile
time iTradeType = new iTradeType, then it works fine. (see my other
comment June 10, 12:29)

The problem occurs only when I compile the assembly and register it
dynamically at run time.

As Nicholas suggested, it's probably something to do with how NH
handles assemblies.

I tried also the following without success:

        AppDomain.CurrentDomain.AssemblyResolve += new
ResolveEventHandler(CurrentDomainAssemblyResolve);

        private Assembly CurrentDomainAssemblyResolve(object sender,
ResolveEventArgs args)
        {
            if (_assembliesPerName.ContainsKey(args.Name))
            {
                return _assembliesPerName[args.Name];
            }
            return null;
        }

On Jun 10, 5:13 pm, Markus Zywitza <[email protected]> wrote:
> The exception sounds like it needs an integer id, since [PrimaryKey] is a
> shortcut for using Identity.
>
> You can also try [PrimaryKey(PrimaryKeyType.Assigned)] instead.
>
> -Markus

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" 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/castle-project-users?hl=en.

Reply via email to