Or inheritance... On Fri, Feb 20, 2009 at 10:47 AM, Fabio Maulo <[email protected]> wrote:
> partial classes > > > 2009/2/20 Humberto Marchezi <[email protected]> > >> Hi, >> >> Sorry, now I realize *I can´t do what I planned in .NET*. >> >> I was trying to find a way to break a Domain Class so that it doesn´t have >> to hold a reference to all kinds of Classes. Initially I thought I could do >> that with Extension Methods but I don´t have a way to store the association >> values such as "documents". This is the situation in more details below: >> >> *PersonDomain.dll:* >> *-----------------------* >> *Person.cs: * class Person { ... } >> *Person.hbm.xml:* <?xml> ..... <hibernate-mapping ...... > ......... >> </hibernate-mapping> >> >> *DocumentDomain.dll: >> --------------------------- >> **PersonExtension:* >> class PersonExtension >> { >> *private static IList<Document> documents; <---------------- It >> can´t be done in .NET (yet) as extension* >> public void AddDocument(this Person p, Document doc) { ........ } >> public void RemoveDocument(this Person p, Document doc) { .......... } >> public IList<Document> GetDocuments(this Person p) { return >> } >> *PersonExtension.hbm.xml:* <?xml> ... <hibernate-mapping .... extends = >> ...... > ........ </hibernate-mapping> >> >> >> However my doubt still persists. >> How do you do to break your Domain Classes or Domain Layer in order to >> prevent it to grow too much ? >> Can you point me to site or article about it ? >> >> thanks in advance. >> >> >> On Fri, Feb 20, 2009 at 10:59 AM, David Mukaiwa <[email protected]>wrote: >> >>> I imagine it shouldn't be an issue to persist the class in diff DBs with >>> separate configs and session factories if that's what you mean. >>> >>> >>> On Fri, Feb 20, 2009 at 1:50 PM, Fabio Maulo <[email protected]>wrote: >>> >>>> Do you want "persist methods"(behavior) ?Please try to explain better >>>> what you are looking for. >>>> >>>> 2009/2/20 Humberto Marchezi <[email protected]> >>>> >>>>> Hi community, >>>>> >>>>> Let´s I have a domain class Person in the assembly PersonDomain.dll and >>>>> I have its extension methods AddDocument, RemoveDocument, GetDocuments, >>>>> etc.. a separated assembly DocumentDomain.dll . >>>>> >>>>> I have a Mapping file Person.hbm.xml for Person in PersonDomain.dll >>>>> working fine however I want to map Person + Extension methods in >>>>> DocumentDomain.dll. >>>>> >>>>> Is it possible to do that ? Is it possible to extend the Person.hbm.xml >>>>> so that I can persist its documents ? >>>>> >>>>> sds >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Humberto C Marchezi >>>>> --------------------------------------------------------- >>>>> Master in Electrical Engineering - Automation >>>>> Software Consultant and Developer >>>>> at the Town Hall of Vitória >>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Fabio Maulo >>>> >>>> >>>> >>> >>> >>> >> >> >> -- >> Humberto C Marchezi >> --------------------------------------------------------- >> Master in Electrical Engineering - Automation >> Software Consultant and Developer >> at the Town Hall of Vitória >> >> >> > > > -- > Fabio Maulo > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
