Yes, I can. But why should I use reflection when NHibernate already loaded that information? Well I simply want to know which NHibernate's class contains this info. I dont want alternative ways of doing this.
On Feb 18, 4:46 pm, Robert Rudduck <[email protected]> wrote: > If you just want to do this, you really don't need NHibernate. Just do a > traversal of the properties using reflection. > > Pusedo code would looks something like: > > create a queue > enqueue the type of the root entityType > while the queue is not empty > - get all the properties and their property type > - add each of those types to the queue and add to output list > - continue > > That will output the graph, what you do with it is up to you.... > > On Thu, Feb 18, 2010 at 3:08 AM, mynkow <[email protected]> wrote: > > No, I don't wanna do this. I want to get the whole GRAPH of an entity. > > You know, the class structure, relations to other entities. I am not > > talking about data but schema of .NET types. I don't know how to > > describe this with other words. If you dont know what is a graph check > > wikipedia > > > On Feb 17, 8:57 pm, nadav s <[email protected]> wrote: > > > if i understand correctly, you wanna fetch one or more user, and would > > like > > > everything to be fetched with it > > > you can set all the associations to lazy=false either ithrough the > > mappings > > > file or when you fetch the object (with FetchMode=join). > > > if you're records are big, i think its better to use select\subselect > > > loading because with a join with multiple tables, you'll have you're > > records > > > multiply for each join... > > > > any way, even without a join, when you access a lazy property, it will be > > > fetched, so even if the whole graph wasn't loaded yet, you can use you're > > > user object as if everything is loaded. > > > > On Wed, Feb 17, 2010 at 8:09 PM, mynkow <[email protected]> wrote: > > > > Hi, > > > > > I have many entities/mappings with 1:n, n:1 and n:m. How can I get all > > > > classes related to "User" entity for example and go deeper until the > > > > whole relation graph is built. In other words I want to get the > > > > relation graph of the mappings. > > > > > Thank you. > > > > > -- > > > > 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]<nhusers%[email protected]> > > <nhusers%[email protected]<nhusers%[email protected]> > > > > > . > > > > For more options, visit this group at > > > >http://groups.google.com/group/nhusers?hl=en. > > > -- > > 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]<nhusers%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/nhusers?hl=en. -- 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.
