-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: A few questions about methodologies
PostPosted: Thu Jan 18, 2007 1:30 pm 
Newbie

Joined: Mon Jan 01, 2007 11:33 pm
Posts: 10
Note that I'm using Vis Web Developer Express so no embedded resources


1. I'm attempting to come up with a deployment strategy(ASP.Net). Currently I'm manually defining the locations of the hibernate-mappings files w/i the code but this won't work as I want to use a precompile option for the deployment (if there's a way to make this work please let me know). I'm currently looking at 2 methods.

a) define the locations of the mappings in the nhibernate configuration files or
b) specify the location relative to the application root in the code (I originally tried this and wasn't successful).
c) is there a c??

here's a sample mapping that doesn't seem to be working
Code:
<mapping
  file="LPLAYERINFO.hbm.xml"
  assembly="APP_CODE" />


This fails with the following error:
Code:
undefined alias or unknown mapping: Mega [from Mega.Join.affiliate_PLAYERINFO__JOIN_TABLE join where affiliate_info_id_fk = ?



I'm not sure how to diagnose this problem.



2. In designing the overall structure I have two primary goals:

a) provide a more granular save model than simply mutable="false"
b) completely abstract session/transactions, et al, away from the business logic.

The overall scheme that I want to use is this.


View Logic
Business Logic
DAL
Nhibernate POCO's


To be more specific, I want to wrap all of the NHibernate POCO's in protection classes with specific attributes to help determine if an object is allowed to be saved, et al. At this time I'm contemplating making the "business objects" be a part of the DAL (DAL returns them, persists them, etc) rather than on top of the DAL. Anyone with any experience and/or insight into this is more than welcome to comment.


The concern that I have right now is with collections. To give a slightly more concrete example.


class nhibernate_poco_address
...

class nhibernate_poco_address_wrapper
private nhibernate_poco_address variable_name;
...


class business_object_person
private IList address_collection; // collection of nhibernate_poco_address_wrapper's


My concern is with loading/saving (mostly saving). Is there a way to simply hand off the collection of wrappers to nhibernate to save (using an interface or inheritance) or will I have to manually save each and every object in the collection? If I have to manually save each and every object, exactly how will this affect the persistence classes with me not using NHibernates collections? Are there any specific issues I should know about?


I apologize if any of this seems ignorant. I'm new to using ORM's so please bear with me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.