Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# mgaerber 4/18/2006 6:18 AM (edited 4/18/2006 6:20 AM)
Hi Martijn,

did you create the existing DDL files using the SchemaExport class?

When I try to load the Cuyahoga.Core assembly from a file path and add it to the config like this:
System.Reflection.Assembly asm = System.Reflection.Assembly.LoadFile(filename);
config.AddAssembly(asm);

I get following exception:
NHibernate.MappingException: 
could not find class: Cuyahoga.Core.Domain.User, Cuyahoga.Core ---> System.TypeLoadException: Could not load type 'Cuyahoga.Core.Domain.User, Cuyahoga.Core', check that type and assembly names are correct

I tried many variations but nothing seems to work. Any clues???
# martijnb 4/18/2006 2:59 PM
I've never tried to generate the DDL with SchemaExport. Probably half of the DB schema already existed before NHibernate was even used. At the moment I'm doing everything manually which isn't the nicest solution. I hope that some day, the NHibernate folks also port SchemaUpdate from Hibernate. That would really be interesting.

Btw, the error message looks like some mapping file isn't compiled into the assembly (set as embedded resource) and might not have anything to do with SchemaExport.
# mgaerber 4/18/2006 11:44 PM
Btw, the error message looks like some mapping file isn't compiled into the assembly (set as embedded resource) and might not have anything to do with SchemaExport.

I triple-checked everything, it's the Core dll from SVN...

Well, I guess I have to hand-code DDLs, too ;-)

# martijnb 4/19/2006 3:09 AM
mgaerberWell, I guess I have to hand-code DDLs, too ;-)

Well, you can always see it as a learning experience. I'm now able write DDL scripts on SQL Server, PostgreSQL and MySQL without having to look at the docs :).
# mgaerber 4/19/2006 5:51 AM
martijnbWell, you can always see it as a learning experience

You really know how to motivate people:)