Login

Username

Password





Register   Reset password

This is a read-only archive of the forum.

# gedw99 8/22/2006 7:36 AM
Hey,

I am trying to port gili's xpgalery to the latest version of the cuyahoga trunk.

I cant work out when and when the domain objects are registered.
This code in the constructor no longer needs to do this, but where do i tell the runtime to do ti instead?
Some config somewhere ????????????


public xpGalleryModuleBase(IFileService fileService, ISessionManager sessionManager)
: base()
{
this._sessionManager = sessionManager;
this._fileService = fileService;

this._galleryId = -1;
this._photoId = -1;

this._sessionManager.RegisterSessionFactory (???)
SessionFactory sf = SessionFactory.GetInstance();
// Register classes that are used by the ArticleModule
sf.RegisterPersistentClass(typeof(Cuyahoga.Modules.xpGallery.Domain.Gallery));
sf.RegisterPersistentClass(typeof(Cuyahoga.Modules.xpGallery.Domain.GallerySection));
sf.RegisterPersistentClass(typeof(Cuyahoga.Modules.xpGallery.Domain.Descriptions));
sf.RegisterPersistentClass(typeof(Cuyahoga.Modules.xpGallery.Domain.Photo));
sf.RegisterPersistentClass(typeof(Cuyahoga.Modules.xpGallery.Domain.GalleryComment));

base.SessionFactoryRebuilt = sf.Rebuild();
}
# mgaerber 8/22/2006 9:19 AM (edited 8/22/2006 9:24 AM)
Hi,

if your module not only inherits from ModuleBase but also implements INHibernateModule (actually there is nothing to implement) then all your mappings will get registered automagically...

@Martijn and Dominique:
Should we make the xpGallery module the "offical" Cuyahoga Gallery module and put it into SVN?
# martijnb 8/22/2006 2:18 PM
That's up to Dominique, I guess. I've nothing against it.