Not sure if I'm following entirely, but my approach to exposing collections
is to make the getter an IEnumerable:
public class Foo
{
private List _bars { get; set; }
public IEnumerable Bars
{
get { return _bars; }
}
}
Then I map this using an access strategy:
public void Override(Au
I'm having trouble mapping the following setup in FNH. Any help would
be appreciated.
/* Classes for Item Hierarchy */
public class ItemA
{
public string AProperty { get; set; }
}
public class ItemB : ItemA
{
Thanks for the help. It doesn't look like this is supported in FNH,
which is a bummer because this is happening on my root object. I'll
just go with HBM and see if we can figure out something better.
On Jan 29, 12:54 pm, Hudson Akridge wrote:
> I believe you can use a custom Loader on a hasMany
I believe you can use a custom Loader on a hasMany (at least in NH, not sure
if FNH supports that or not. Source not in front of me). We could write a
custom SqlQuery for you and go that route. That was actually what I was
going to work on this weekend for you, but if you wanted to check into it
yo
I see. As I was messing with the mapping, I had a feeling that was
going to be the answer. Since I can't modify the DB, that won't work
for me.
Is there any way I can specify the sql to satisfy that relationship?
On Jan 29, 12:46 pm, Hudson Akridge wrote:
> I can try taking a look at it this w
I can try taking a look at it this weekend (although fair warning, pretty
packed set of days coming up...) and see what I can do. The workaround
involves adding the PolicyNumber column to your table twice. Once for actual
use by the compositeId, and the second time for use as the property. Then
kee
I've heard nothing from NHUSERS group on how to resolve this. I'd be
interested in hearing your workaround of mapping PolicyNumber twice.
It sounds ugly, but perhaps the only option. I can't quite figure out
how to do this though?
On Jan 26, 10:38 am, Corey Coogan wrote:
> Thanks Hudson. I act
Thanks again for your response. :-)
I was actually thinking of going with either Item 1 (most likely), or
Item 5. I don't have enough DDD experience to say whether leaving out
the logins would be correct in terms of architecture. I'm sure that
one could make arguments either way.
I found an in
I'm definitely going to look into the other strategies that you
mentioned.
One that I found, and seems to work, is the wrapper strategy that you
alluded to in item number 4. I created a private property that is
revealed in the mapping and is accessed using the wrapper in a public
property. When
If you have a single user, who's returning 1333 Login objects, then that
seems like a possible design issue, I would agree. I currently write a very
large EAV system using NH, so I know all about returning a lot of rows ;)
(12 million rows in the values table without really trying right now).
Ther
You may want to toss your question over to the NHUsers google group, but
I'll give you my feedback for as much as It'll help ;)
is this a trade off wherein we sacrifice encapsulation for performance
This. As far as I'm able to gleen, that is the correct assumption to make.
There are ways around
This is another issue that I'm working on and, unlike the previous
one, I don't have a solution for it.
The issue is that I have a property on my parent object, User, and the
property is called Logins. Logins represents a collection of Login
information that includes when the user logged in, ip ad
I have several issues that I'm working on, because I'm a newbie at
this, and wanted to address the one that I "solved" first.
The problem was that I was noticing that all of my collections were
not loading lazily, no matter what I did to mark them as such. It
then dawned on me that the problem wa
Should quoting fields like this be the responsibility of Fluent
NHibernate? What about using hbm2ddl.keywords and
SchemaMetadataUpdater as demonstrated in
http://fabiomaulo.blogspot.com/2009/06/auto-quote-tablecolumn-names.html
?
With an opt-in/out option for its use as part of the fluent
configur
14 matches
Mail list logo