Performance has been taken care of in version 1+ :)
2009/8/13 Asbjørn Ulsberg
>
> Wasn't there talk about building HBM objects directly instead of going
> through the XML files (that need the painstakingly slow validation)? Won't
> that speed things up quite a bit, and isn't that a change indepe
I haven been using the latest release of Sharp Architecture with
Fluent Nhibernate. I ran into this error:
---> NHibernate.MappingException: Could not compile the mapping
document: (XmlDocument) ---> System.IndexOutOfRangeException: Index
was outside the bounds of the array.
at N
The constructor for the Party entity map is:
public PartyMap()
{
Id(x => x.Id);
//Other studd
JoinedSubClass("Id", m =>
{
m.References(c => c.Title);
m.Map(c => c.Forename);
m.Map(c =>
I have a component that I map as follows:
Component(x => x.Value, CurrencyAmountComponent.Map
()).Access.AsPascalCaseField(Prefix.Underscore);
I would like to use a convention to specify the Access so I can reduce
the above to:
Component(x => x.Value, CurrencyAmountComponent.Map())
However, it
True. It's from SharpArch and returns a configured Mapper. I thought
you might have seen it so I didn't bother changing it.
On Aug 12, 4:03 pm, James Gregory wrote:
> What's the AutoPersistenceModelGenerator.Generate do? It's not one of ours.
>
> On Wed, Aug 12, 2009 at 9:58 PM, Corey Coogan
Wasn't there talk about building HBM objects directly instead of going
through the XML files (that need the painstakingly slow validation)? Won't
that speed things up quite a bit, and isn't that a change independent of
NH?
-Asbjørn
On Thu, 23 Jul 2009 12:16:15 +0200, James Gregory
wro
Hi David,
Am I meant to pull a new version of the code and compile/grab latest
binaries?
Anyway...I tried the workaround you suggested with the code now looking like
what is below (note the inclusion of *StatementCacheSize(100)*).
Unfortunately the error hasn't disappeared.
=
What's the AutoPersistenceModelGenerator.Generate do? It's not one of ours.
On Wed, Aug 12, 2009 at 9:58 PM, Corey Coogan wrote:
>
> This may seem like a dumb question, but I can't figure out how to get
> my mappings if there is an error. It would be handy to see what's
> being generated before
This may seem like a dumb question, but I can't figure out how to get
my mappings if there is an error. It would be handy to see what's
being generated before FNH tries to compile. Here's what I have, but
if there's an error with the mappings, such as what's been discussed
with multiple subclass
Hi again,
Sorry for my bombardment of questions, i'm trying to learn as much as I can
from the experts.
In my legacy database I had an several tables for my accounts with a
one-to-one relationship. These are the tables:
Account
- AccountId
- Email
- Passwor
I'm using SharpArch also. How are you going to handle this? I tried
to exclude my User baseclass and subclasses but it's not working. My
base class is User.
///
/// Provides a filter for only including types which inherit
from the IEntityWithTypedId interface.
///
pri
What stopped you from applying Mick's patch? What exactly is preventing you
from running FNH under medium trust? People who have this issue seem to drop
in, say "it doesn't work in medium trust", and then never come back. Makes
it very difficult to pin it down.
On Wed, Aug 12, 2009 at 9:11 PM, Jor
Hi James.
Any idea on when there will be a supported release from you guys where
this is addressed and working?
I could not apply the patch supplied by Mick Delaney, is there a
version in the repository that has got it applied?
Is there any other way of getting FluentNHibernate to work under
me
Hi
I've searched the internet trying to figure out how to get many to
many mappings working - i'm a bit new to fluent too.
so far i've tried:
configuration.AddAutoMappings(AutoPersistenceModel.MapEntitiesFromAssemblyOf().ForTypesThatDeriveFrom(
map=> map.HasManyToMany( r=>
r
Thanks for your help, James. I found ExportTo().
On Aug 12, 11:48 am, James Gregory wrote:
> WriteMappingsTo is an older method of exporting mappings, but it should
> still work. How are you configuring NHibernate? ExportTo should be available
> on the FluentMappings property inside the Mappings
WriteMappingsTo is an older method of exporting mappings, but it should
still work. How are you configuring NHibernate? ExportTo should be available
on the FluentMappings property inside the Mappings on Fluently.Configure.
Mouthful :)
On Wed, Aug 12, 2009 at 4:47 PM, Roger wrote:
>
> I am using
I am using the latest release of Sharp Architecture with Fluent
NHibernate. I have been debugging a mapping error and need to call the
ExportTo() function. For some reasons, I was not getting it from
Intellisense. But I did find a WriteMappingsTo() function. Do both
functions generate mapping file
Definitely. :) Think of it this way, how else would NH know about your
Teacher, or more importantly, how to rehydrate a Teacher instead of a User
whenever you retrieve information from that row. It's that discriminator,
when you persist a Teacher, it needs to know how to flag it as a Teacher
class,
What is the Teacher does not exposes any additional attributes and is
same as the User class? Do I still have to use the
DiscriminateSubclasses in the UserMap?
Thanks,
Azam
On Aug 12, 9:47 am, Hudson Akridge wrote:
> Even with no specific attributes on Teacher (which if all you've got is
> diff
Thanks!
I will give that a try! I did not know I had to register subclasses if
the base class is using the Table in the database.
Thanks,
Azam
On Aug 12, 9:47 am, Hudson Akridge wrote:
> Even with no specific attributes on Teacher (which if all you've got is
> different behavior, you may want
Even with no specific attributes on Teacher (which if all you've got is
different behavior, you may want to look at the State pattern), you still
need to register Teacher as a subclass with FNH/NH, and you do that by
declaring it on the DiscriminateSubclasses FNH method in your UserMap.
On Wed, Au
Yup, got that too late, apologies ;) Who's in charge of caffeine around
here? They're fired!
On Wed, Aug 12, 2009 at 9:38 AM, James Gregory wrote:
> I was actually referring to what Azam is trying to do :)
>
> You should never need to subclass your ClassMap.
>
>
> On Wed, Aug 12, 2009 at 3:30 PM,
Hi,
Thanks for the reply!
Teacher inherits from User class and there is only Users table in the
database.
User class has a UserMap which defines the mapping for the User.
Teacher does not define any mapping. If I don't have any mapping for
Teacher then it gives error for "persister not defined"
I was actually referring to what Azam is trying to do :)
You should never need to subclass your ClassMap.
On Wed, Aug 12, 2009 at 3:30 PM, Hudson Akridge wrote:
> Absolutely correct :) I might have misunderstood what the OP was asking, I
> assumed that he wanted to extend the mappings for Teache
Absolutely correct :) I might have misunderstood what the OP was asking, I
assumed that he wanted to extend the mappings for Teacher from his UserMap.
As James says, Teacher automatically gets the mappings from it's base class
of User, but if you want to map the Teacher specific attributes, you nee
Why would you want to do that? Subclasses automatically inherit their
parents mappings, so if there's nothing new in a subclass there's nothing to
map. There's no benefit in subclassing your parent's ClassMap.
On Wed, Aug 12, 2009 at 3:15 PM, Hudson Akridge wrote:
> You have to map inheritance wi
You have to map inheritance with the Discriminate mapping in your User
class. So all of your mapping for any concretes of User (Teacher/Student)
will have to be in the UserMap. In release 1.0 (The model branch on Github
atm), that's not the case, and you can actually create separate class maps
for
Can I use inheritance when using Mapping?
Let's say I have a User class and the UserMap defined. I have Teacher
class which inherit from User and uses the same table as User (Users
table). Now, I want to use the same mapping for the Teacher class. Can
I say:
public class TeacherMap : UserMap
{
}
Thanks Hudson!
On Aug 11, 11:47 pm, Hudson Akridge wrote:
> You're going to want a single table per inheritance hierarchy mapping, aka
> Discriminator Mapping.
> The trick to doing that, is that pretty much all of your columns have to be
> set to nullable. Reason being, because a Teacher is sav
@james - Master branch has a pull enroute.
@ssp - Sorry about that; the OracleDataClientConfiguration prefers having
StatementCacheSize(int) specified. Since you're using OracleClient, that
was probably throwing a fit. The StatementCacheSize is now optional, so
your current configuration string
Thanks David, hit me with a pull request when you're done.
On Wed, Aug 12, 2009 at 12:45 PM, David R. Longnecker <
tiredstud...@gmail.com> wrote:
> I see the problem in the FNH code. I'll update that. To work around it
> for now, specify the StatementCacheSize(int) fluent method on your
> conne
I see the problem in the FNH code. I'll update that. To work around it for
now, specify the StatementCacheSize(int) fluent method on your connection
string.
Odd no one has ever ran into that. Whoops.
-dl
On Tue, Aug 11, 2009 at 9:13 PM, ssp wrote:
>
> I am trying to connect to an oracle 10g
Hi,
Just a quick question about where is the best place to initialize the
ServiceLocator before all my Data tests are run. At the moment i am running
it in the [TestFixtureSetup] before each test.
I was wondering if there is a more global place to initialise it so i don't
have to do this fo
I am trying to connect to an oracle 10g database with the following
configuration. For some reason I keep getting the:
"Keyword not supported: 'statement cache size'." exception. Any ideas?
The code below contains the configuration code.
==
return Flue
Hi All,
Great work on this project so far.
I have a requirement to add multiple assemblies when building an auto-
map, but the API only supports adding one (AFAIK - unless someone can
tell me how to do it with the current API).
The change consists of changing AutoPersistenceModel.AddEntityAssem
35 matches
Mail list logo