That's quite an interesting usage pattern I hadn't thought of Bart. Very
nice.
On Fri, Jan 9, 2009 at 2:06 PM, wrote:
>
> Troy,
>
> I think it's very usefull to combine the automapping with custom
> mapping to get the best of both worlds. The approach that I'm testing
> out is defining your cust
Troy,
I think it's very usefull to combine the automapping with custom
mapping to get the best of both worlds. The approach that I'm testing
out is defining your custom mapping as a specialization of an
automap:
eg.
My entity customer:
public class Customer
{
public Guid Id {get;set;
Hi Troy
Yeah, to get the benefit you really have to set a bunch of constraints and
try to stay inside them it's usually best on a greenfield to be honest.
Andy
On Thu, Jan 8, 2009 at 4:29 AM, Troy Goode wrote:
> Thanks Andy,
>
> Evidently I had a version of the source from before IsBaseType was
Thanks Andy,
Evidently I had a version of the source from before IsBaseType was
introduced. Once I refreshed and rebuilt the source I was able to get
everything working. In the end, though, I decided to go back to using
ClassMap because I was having to create so many overrides for things like
With
Hi Troy
Here we go straight from the tests :o), always a good place to put things
you can't remember.
var autoMapper = AutoPersistenceModel
.MapEntitiesFromAssemblyOf()
.Where(t => t.Namespace ==
"FluentNHibernate.AutoMap.TestFixtures.SuperTypes")
Thanks Andrew, that makes sense, but unfortunately I'm still not
getting it to work. I added a convention for GetPrimaryKeyName, but
wasn't able to determine what convention to use to change the
baseobject to BaseEntity from object. When you have some time, any
help would be appreciated.
Troy
On
Hi Troy
I'm away from the code right now but the answers your are looking for are
under the WithConventions method.
>From there you can set your baseobject to be BaseEntity rather than object
and set GetPrimaryKeyName to be Id.
Hope that helps if not i'll look it up when I'm back at a machine.
A