Hi Josh, I've not come across a property for setting the global fetch mode on queries, but that's not to say there isn't, although I think it's unlikely.
My suggestion here would be the same as it was a few weeks back when someone else had an issue querying a dynamic object graph, somehow you need to establish the entities and relationships at runtime and from there dynamically generate your query to eagerly fetch the relationships. Reflection to check attributes, handle the ActiveRecordMediator.ModelCreated (can't recall the exact name) event or use your own custom storage to query the model. Regards Nick -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of JoshG Sent: 13 May 2011 03:11 AM To: Castle Project Users Subject: Re: Forcing an Eager fetch of data Thanks for the response. Sorry, bad example in the previous post, I did say "from record o" In actual fact, I would only ever be doing "from record o where o.Id = XXX" I would only ever be loading one record using this method, and as such, I want to load the entire object graph for this object. The trouble is I don't know the columns that have the relations - so I can't write "fetch o.other" as I don't know the exact names of the columns in this instance (the schema is runtime specific). Any thoughts? Josh -- You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Castle Project Users" 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/castle-project-users?hl=en.
