[fluent-nhib] Re: Setting UserType on Id

2009-02-24 Thread James Gregory
There's not currently a fluent way to do this, but you should be able to use SetAttribute("type", typeof(MyUserType).AssemblyQualifiedName) On 2/24/09, pq wrote: > > Hi, > > I'm working with a legacy Oracle DB with natural keys. A lot of the > are char(10)...I have a UserType defined (TrimmedStr

[fluent-nhib] Re: fluent is producing both joined-subclass and subclass for each child entity

2009-02-24 Thread James Gregory
Seen your issue. I'm away from a machine currently though, so I can't be of any help until tomorrow. On 2/24/09, aawaijane wrote: > > I submitted an issue yesterday where fluent is creating both a joined- > subclass and a subclass mapping for child entities of a base class. > The child classes

[fluent-nhib] Re: Overriding component mapping w/AutoPersistenceModel scenario not recognized

2009-02-25 Thread James Gregory
I think somebody raised this a little while ago. I think the many-to-one automapper is grabbing your property before the component automapper gets to it. So when the overrides get merged in, there isn't an automapped component to merge with. Definitely a bug :) On Wed, Feb 25, 2009 at 12:33 AM, Bi

[fluent-nhib] Re: Referenced entity is null

2009-02-25 Thread James Gregory
Your mapping looks fine. How're you creating/saving your entities? On Wed, Feb 25, 2009 at 6:35 AM, jshaikh wrote: > > I am using nHibernate 2.0.1.4000, within S#arp architecture. My > following map file returns Type as NULL. This was working for me, > about a couple of days back, I have not mad

[fluent-nhib] Breaking change: TheColumnNameIs -> ColumnName

2009-02-25 Thread James Gregory
Just a heads up guys, I've renamed TheColumnNameIs to ColumnName; this has been bugging me for a while. The behavior has changed slightly too, in that you can call it multiple times to add more than one column name to a property (for composite property's). James --~--~-~--~~---

[fluent-nhib] Re: a patch for configuring adonet.batchsize

2009-02-25 Thread James Gregory
Applied, thanks! On Wed, Feb 25, 2009 at 8:10 AM, Karron Qiu wrote: > Hi, I created a patch for configuring adonet.batchsize, unit test > included. Please have a look. > > Thanks. > > -- > Regards, > Karron > > > > --~--~-~--~~~---~--~~ You received this message

[fluent-nhib] Re: About Output Mappings!!

2009-02-25 Thread James Gregory
You people certainly output mappings in some weird ways. What's wrong with just using WriteMappingsTo on the PersistenceModel? As for the APM, you can call CompileMappings instead of Configure - same difference just without requiring a Configuration instance. On Wed, Feb 25, 2009 at 2:19 AM, Levin

[fluent-nhib] Re: CustomTypeIs doesn't work correctly for composite user types. Have submitted failing test (issue 129).

2009-02-25 Thread James Gregory
I've fixed this and closed the issue, thanks. On Tue, Feb 24, 2009 at 6:26 PM, James wrote: > > Hi, > > I'm having trouble getting composite user types to work correctly with > fluent NHibernate. I've submitted a patch which includes a failing > test (but not a fix unfortunately, I don't have th

[fluent-nhib] Re: IsDirty Flag to Generate connection_string Tag

2009-02-25 Thread James Gregory
I'm only dashing here, so I can't give a proper answer. What you're doing sounds right, the IsDirty really should be protected internal rather than just internal; it's internal so it doesn't show up for consumers of the interface, but that obviously stops inheritors from using it too! On a side not

[fluent-nhib] Re: Map private property

2009-03-01 Thread James Gregory
Did you read the wiki? How is yours any clearer than the Reveal example? On 3/1/09, epitka wrote: > > I don't like any of these but this might work. What do you think? > > Map(x=>x.GetType().GetProperty("propertyName").Name); > or > > Map(x => x.GetType().GetProperties().Single > (p=>p.Name=

[fluent-nhib] Re: how to load nhibernate.config

2009-03-01 Thread James Gregory
That should work. Have you tested your config without Fluent? On 3/1/09, epitka wrote: > > Ok I can do it like this > > Configuration cfg = LoadDefaultConfiguration(); > _sessionFactory = Fluently.Configure > (cfg).BuildSessionFactory(); > > but how do I add mapping assembly. A

[fluent-nhib] Re: how to load nhibernate.config

2009-03-01 Thread James Gregory
t sender, EventArgs e) +37 > > > System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute > () +68 > System.Web.HttpApplication.ExecuteStep(IExecutionStep step, > Boolean& completedSynchronously) +75 > > On Mar 1, 11:31 am, James Gregory wrote: > > That shou

[fluent-nhib] Re: Default Property set Implementation for use in ForAttribute

2009-03-01 Thread James Gregory
Attributes aren't really in our game plan. The ForAttribute thing is a nice shortcut, but it's not really something I want to promote. One of the big tenets of Fluent NHibernate is that it doesn't pollute your entities with mapping concerns; as a result, there aren't going to be any prebuilt attrib

[fluent-nhib] Re: how to load nhibernate.config

2009-03-01 Thread James Gregory
se? > > On Mar 1, 12:30 pm, James Gregory wrote: > > I'm a little confused as to what you're trying to achieve. Can you > explain > > your setup a little better? > > > > On Sun, Mar 1, 2009 at 5:44 PM, epitka wrote: > > > > >

[fluent-nhib] Re: how to load nhibernate.config

2009-03-01 Thread James Gregory
mbly.Load("dnnSphere.Meta"))) >.BuildSessionFactory(); > > On Mar 1, 1:21 pm, James Gregory wrote: > > Yeah, that makes sense. > > Your exception tells me that you haven't added any fluent mappings. You > > should just be able

[fluent-nhib] Re: how to load nhibernate.config

2009-03-01 Thread James Gregory
p? > > On Mar 1, 2:02 pm, James Gregory wrote: > > You shouldn't need to do the HbmMappings part, as that will be picked up > > from your config. > > > > On Sun, Mar 1, 2009 at 7:55 PM, epitka wrote: > > > > > That is the thing, NHibernateHelper is e

[fluent-nhib] Re: How do you avoid selecting all tables with JoinedSubClass?

2009-03-02 Thread James Gregory
Your design seems a little strange, why are you mapping everything as joined-subclasses under DomainEntity? It's more sensible to map everything individually. On Mon, Mar 2, 2009 at 7:38 AM, BringerOD wrote: > > Here is my mappings. > > When I select a DomainEntity it tries to retrieve all data.

[fluent-nhib] Re: Can the responsibility of creating the NH Configuration object be seperated from the method that builds the session factory

2009-03-02 Thread James Gregory
You can pass a Configuration instance into Configure, or you can use ExposeConfiguration. On 3/2/09, christianacca wrote: > > I am trying to integrate FNH with the Session management functionality > implemented in the uNhAddins project. > > It seems like I cannot "get at" the NH Configuration ob

[fluent-nhib] Re: Examples.FirstProject - No Inserts to Employee table happening

2009-03-03 Thread James Gregory
; > > // added by Fred Morrison because Store objects > > > > don't seem to save the Employee's > > > > // that work in the store. > > > > var employees = new List() { daisy, > > >

[fluent-nhib] Re: Examples.FirstProject - No Inserts to Employee table happening

2009-03-03 Thread James Gregory
ve the Employee's > > > // that work in the store. > > > var employees = new List() { daisy, > > > jack, sue, bill, joan }; > > > foreach (var employee in employees) > > >

[fluent-nhib] Re: documentation api

2009-03-03 Thread James Gregory
Your best bet is the Wiki, but it's not complete and it certainly doesn't cover the API in depth (to the level overloads etc...). Your best bet is to just investigate with Intellisense, it's not all that complicated; failing that, the unit tests are always a good place to read - we're about 80% cov

[fluent-nhib] Re: Table per class hierarchy

2009-03-03 Thread James Gregory
The wiki should really contain something about this, but it doesn't yet. I wrote a blog post about it a while ago though, so you should be able to get started from there: http://blog.jagregory.com/2009/01/05/fluent-nhibernate-subclass-syntax-changes/ On Tue, Mar 3, 2009 at 10:43 PM, mhnyborg wro

[fluent-nhib] Re: Table per class hierarchy

2009-03-03 Thread James Gregory
009 at 11:23 PM, mhnyborg wrote: > > Thanks that was fast, and it works. > > The examples would be a lot clearer if you show how to specify the > discriminator values. > > On Mar 3, 11:59 pm, James Gregory wrote: > > The wiki should really contain something about this

[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread James Gregory
There's nothing in FNH to do the actual name conversion, but you could create an ITypeConvention implementationwhich would handle your properties - you'd just need to handle the ids. public class ColumnNameConvention : ITypeConventio

[fluent-nhib] Re: Auto Mapping and Table per class hierarchy

2009-03-04 Thread James Gregory
I'm pretty sure we don't support this with automapping. You'll have to map these classes with standard fluent mappings. On Tue, Mar 3, 2009 at 2:14 PM, Matteo Baglini wrote: > > Hi, > > I read that Auto Mapping supported "table-per-subclass" inheritance > strategy. > http://wiki.fluentnhibernate.

[fluent-nhib] Re: Where is the "Where" clause?

2009-03-04 Thread James Gregory
This is not implemented yet. You can use the SetAttribute method instead. On Wed, Mar 4, 2009 at 9:52 AM, mhnyborg wrote: > > I can not find the "Where" clause in the fluent mapping. > > If it's there can someone show me an example > > > > > > > > > --~--~-~--~~--

[fluent-nhib] Conventions overhaul

2009-03-04 Thread James Gregory
Guys, This email is a heads up, with an opportunity to provide feedback before I commit these changes to trunk. I want to make it clear that I'm not bashing the work of the developers before myself who wrote the original conventions code. I mean no disrespect, it's just not my idea of where it sho

[fluent-nhib] Re: Conventions overhaul

2009-03-04 Thread James Gregory
a semantic model under > James branch and we remove the original rewrite effort, and I don't like > effort being wasted. > > I'd really like to hear what other people think about this. > > Cheers > > Andy > > On Wed, Mar 4, 2009 at 1:10 PM, James Gregory wrot

[fluent-nhib] Re: Keeping the Property and XML order in sync

2009-03-04 Thread James Gregory
Nope. It's not possible because we sort all the mappings to make sure it satisfies NHibernate's order requirements. If we didn't do this, you can create invalid mappings depending on what order you map things. We'd have to come up with a more sophisticated algorithm for sorting, but I really don't

[fluent-nhib] Re: Keeping the Property and XML order in sync

2009-03-04 Thread James Gregory
t; keep going back-n-forth between Properties, XML and Database column.With DDD > aproach, creating XML and consequently, the database columns being in > different order, does create friction. > Thanks > Ramana > > On Wed, Mar 4, 2009 at 12:03 PM, James Gregory wrote: > >>

[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread James Gregory
thTable("leveling_table"); >Id(x => x.Id).TheColumnNameIs("leveling_table_id"); >} >} > > > > On Mar 4, 7:49 am, Ramana Kumar wrote: > > Hi aemami > > Please look at the solution in the threadhttp:// >

[fluent-nhib] Re: How to add mappings based on a consistent convention?

2009-03-04 Thread James Gregory
Something that limits the automapper, perhaps to a single namespace. On Wed, Mar 4, 2009 at 7:53 PM, aemami wrote: > > What should it be changed to? > > On Mar 4, 11:47 am, James Gregory wrote: > > I'd imagine your Where(x => true) will be causing problems, as it'

[fluent-nhib] Re: Composite reference keys always doing lazy loading

2009-03-04 Thread James Gregory
Hey Kevin, Just so I understand correctly, it's the key-many-to-one element that should have a lazy attribute on, but when you use SetAttribute it's being put on the composite-id element? If that's the case, then it shouldn't be a big change to get a Lazy property that works that way. I'll create

[fluent-nhib] Re: Composite reference keys always doing lazy loading

2009-03-05 Thread James Gregory
zy", "false") on that element works > fine as a workaround but I think should not be necessary if FNH > intends to default lazy to false. > > Thank you, > > Kevin > > On Mar 4, 6:16 pm, James Gregory wrote: > > Hey Kevin, > > Just so I understand

[fluent-nhib] Re: Composite reference keys always doing lazy loading

2009-03-05 Thread James Gregory
Kevin Miller > > > On Thu, Mar 5, 2009 at 3:20 AM, James Gregory > wrote: > >> I believe lazy is actually true by default. Either way, they Lazy methods >> are required because you can override the default in conventions, so >> someone >> could set it to true

[fluent-nhib] Re: Fluent Configuration

2009-03-05 Thread James Gregory
There should be an inner exception in the FluentConfigurationException, what's it say? On Thu, Mar 5, 2009 at 10:28 PM, Craig van Nieuwkerk wrote: > > I am trying to configure fluent nHibernate and have this code > >Assembly mappingAssembly = > Assembly.ReflectionOnlyLoadFrom("Lib

[fluent-nhib] Re: Automapping class to point to the same table twice

2009-03-05 Thread James Gregory
You'll need to do an override and explicitly set those two relationships to be many to many's. Off the top of my head, use the ForTypesThatDeriveFrom method with City, and call HasManyToMany for both PersonWorks and PersonBirths. You may need to play around with the parameters, possibly explicitly

[fluent-nhib] Re: Is the References function broken?

2009-03-05 Thread James Gregory
No it's not broken, somebody else would've noticed by now and our tests are pretty comprehensive. Can you show me the code you're using to A) create your entities, and B) save your entities. Your mappings look ok. On Fri, Mar 6, 2009 at 12:46 AM, aemami wrote: > > Cause it's just not working for

[fluent-nhib] Re: DiscriminateSubClasses question

2009-03-06 Thread James Gregory
You don't normally have the discriminator as an actual property in your entity too, it's usually just a column. That's not to say it's incorrect, just something I've not seen before. Perhaps try it without. On Fri, Mar 6, 2009 at 2:21 AM, Roger Heim wrote: > > Hi All, > > I've just started using

[fluent-nhib] Re: DiscriminateSubClasses question

2009-03-06 Thread James Gregory
invalid. If the sequence is Version() followed by > DiscriminateSubClassesOnColumn(), Fluently.Configure() failes but a > generated hbm.xml file is correct. > > I'm sorry I don't know enough about the FNH source to offer a patch. > > On Mar 6, 3:44 am, James Gregory wrot

[fluent-nhib] Re: ArgumentOutOfRangeException : Index was out of range.

2009-03-06 Thread James Gregory
Good catch! On Fri, Mar 6, 2009 at 9:26 PM, Jan Van Ryswyck wrote: > > I found the solution to this problem which resulted from my own > stupidity in the first place. It all became clear to me as soon as I > generated the hbm files from the fluent NH mapping. > > >... > > > > >

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-08 Thread James Gregory
I'm not really familiar with composite keys in a production environment (nothing outside of writing the code to support it in FNH), could you give me an example of the actual code you're using to save your entities? Even more helpful would be if you could reduce your mappings down to the bare minim

[fluent-nhib] Re: Subclassing from a "SubClassMap"?

2009-03-09 Thread James Gregory
You can't currently do that. It's something we're planning on supporting, but it isn't done yet. I'm not in a position to show code right now, but I'm sure you could hack something together in the meantime using reflection. On Mon, Mar 9, 2009 at 2:54 PM, Eric Liprandi wrote: > > Hi, > > I have b

[fluent-nhib] Re: Testing against existing schema

2009-03-10 Thread James Gregory
There's the PersistenceSpecification which will verify your mappings are persisted correctly. Most of the time we hook it up to a SQLite DB, but there's nothing stopping you from using it against another database. Should work for what you need. Just be warned it doesn't handle complex mappings very

[fluent-nhib] Re: Add ClassMap's conditionally/conventionally

2009-03-11 Thread James Gregory
Agreed, this is a good idea. There are a few more places that have similar functions which could do with it as well, but just add it to whichever ones you're using and I'll roll it out to everything else as and when I come across them. On Wed, Mar 11, 2009 at 2:23 AM, Paul Batum wrote: > I see n

[fluent-nhib] Re: is it possible to combine ClassMap with conventions?

2009-03-11 Thread James Gregory
Conventions can be applied to standard ClassMaps. http://wiki.fluentnhibernate.org/show/StandardMappingConventions On Wed, Mar 11, 2009 at 7:51 AM, Filip Kinsky wrote: > > I'm beginning with FluentNH and I'm just thinking if it's possible to > combine standard ClassMaps with conventions approach

[fluent-nhib] Re: Testing against existing schema

2009-03-11 Thread James Gregory
anityChecks.aspx > * > > > *From:* fluent-nhibernate@googlegroups.com [ > mailto:fluent-nhibernate@googlegroups.com > ] *On Behalf Of *James Gregory > *Sent:* 10 March 2009 11:24 > *To:* fluent-nhibernate@googlegroups.com > *Subject:* [fluent-nhib] Re: Testing against existing

[fluent-nhib] Re: HasMany Type Safe Enums

2009-03-11 Thread James Gregory
You need an NHibernate IUserType for Role, then you can specify that with CustomTypeIs() on your Roles property. On Mon, Mar 9, 2009 at 5:13 PM, Dave Woods wrote: > > I am doing manual mapping classes and I think I am stumped on this > one: > > public class user > { >public int UserId { get;

[fluent-nhib] Re: When mapping a byte array, how do I specify the maximum size?

2009-03-11 Thread James Gregory
Use the WithLengthOf method. On Wed, Mar 11, 2009 at 9:42 AM, pangyan wrote: > > I've got this class: > > class Account > { >public int Id { get; set; } >public string FullName { get; set; } >public byte[] Photo { get; set; } > } > > When mapping Photo, using Map(x => x.Photo), it wo

[fluent-nhib] Re: Easiest way to configure all URI properties to custom IUserType

2009-03-11 Thread James Gregory
That's the correct way. How much easier do you want? On Tue, Mar 10, 2009 at 3:25 PM, Mike Chaliy wrote: > > Hi all, > > I have custom IUserType - UriUserType, how to configure AutoMapping to > use this type for all Uri properties? > > At this time I am using custom implementation of the ITypeCo

[fluent-nhib] Re: Fluent generates partial reference assemblies

2009-03-11 Thread James Gregory
That's a bug. You'll need to modify the offending area of code in the FNH codebase yourself, or wait until one of us has time to fix it. On Wed, Mar 11, 2009 at 9:17 AM, Sergio Costa wrote: > > Hi list, > > I posted an issue on the project site about Fluent Nhibernate > generating mappings with

[fluent-nhib] Re: Fluent generates partial reference assemblies

2009-03-11 Thread James Gregory
ok to always generate the full assembly name? > > I'll send a patch with the changes. (What's the procedure for doing > so?) > > Regards and thanks for the quick response > SC > > On Mar 11, 10:09 am, James Gregory wrote: > > That's a bug. You'll need

[fluent-nhib] Re: Easiest way to configure all URI properties to custom IUserType

2009-03-11 Thread James Gregory
g) >{ >if (!propertyMapping.HasAttribute("type")) >{ >propertyMapping.CustomTypeIs(_customType); > } > >} > } > > On 11 Бер, 12:07, James Gregory wrote: > > Tha

[fluent-nhib] Re: Mapping sub classes

2009-03-11 Thread James Gregory
I don't think you should be mapping Name in the SuperClassTypeMap as well as in the subclasses. On Wed, Mar 11, 2009 at 12:44 PM, Martin Nilsson wrote: > I'm trying to map the state pattern to NH as this page tells me to do: > > http://www.lostechies.com/blogs/derickbailey/archive/2008/11/26/mapp

[fluent-nhib] Re: HasMany Type Safe Enums

2009-03-11 Thread James Gregory
d on a HasMany(). Am I going about this the > wrong way maybe? > > I have worked around it using an intermediary object which works but is a > bit clunky :) > > > James Gregory wrote: > > You need an NHibernate IUserType for Role, then you can specify that with > CustomTyp

[fluent-nhib] Re: HasMany Type Safe Enums

2009-03-11 Thread James Gregory
Tell me about it! ;) On Wed, Mar 11, 2009 at 3:09 PM, David Woods wrote: > No worries. I will continue with my workaround for now. If I can find time > I will look into contributing a patch for this functionality (finding time > is always the hardest part). > > Dave > >

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-11 Thread James Gregory
> > > > > > Hi > > > Can I ask you to check a few things, we'll take your service out of the > > > equation to start with. > > > > > Order o = new Order(); > > > o.OrderDate = DateTime.Now; > > > Session.SaveOrUpdate(o); >

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-11 Thread James Gregory
eive from me? > > > > On Mar 11, 3:37 pm, James Gregory wrote: > > Neither of us said we don't like composite-ids, although that may be the > > case, we just don't have a great deal of experience using them. This is > why > > we're not being all that

[fluent-nhib] Re: InnoDB Tables

2009-03-11 Thread James Gregory
Do you know how to do this with regular NHibernate? If you don't, it's best you ask the question at the nhibernate users mailing list. Once you know that, we'll know how to implement the behavior for Fluent. http://groups.google.com/group/nhusers On Wed, Mar 11, 2009 at 3:42 PM, Tom Warnat wrote:

[fluent-nhib] Re: Constraints not making it to the database schema

2009-03-11 Thread James Gregory
Sorry guys, this one slipped under the radar. I'm swamped currently, but I should be doing a comb through of patches in the next few days. Filip: Hopefully you should be able to apply Steven's patch directly to your code for the time being. 2009/3/11 Filip Kinsky > > Is this applied to the trunk

[fluent-nhib] Re: HasMany Type Safe Enums

2009-03-11 Thread James Gregory
@Erik: That's interesting, I've not seen that approach before. On Wed, Mar 11, 2009 at 8:49 PM, BringerOD wrote: > > Did you end up getting this to work? > > On Mar 9, 10:13 am, Dave Woods wrote: > > I am doing manual mapping classes and I think I am stumped on this > > one: > > > > public clas

[fluent-nhib] Re: Conventions overhaul

2009-03-11 Thread James Gregory
the inner machinery that makes James' conventions work > will change when we move to the semantic model, but our users will be > isolated from this. > > On Thu, Mar 5, 2009 at 3:32 AM, James wrote: > >> >> Sounds excellent. >> >> On Mar 4, 8:10 am, James

[fluent-nhib] Re: Conventions overhaul

2009-03-11 Thread James Gregory
he semantic model branch... > :) > > > On Thu, Mar 12, 2009 at 8:39 AM, James Gregory wrote: > >> ...and it's committed! *Hides from the angry mob of devs with broken >> builds* >> The wiki has been updated with the new syntax, as well as with some &

[fluent-nhib] Re: Base types using new conventions?

2009-03-12 Thread James Gregory
It's still there, you just access it through WithSetup instead of WithConvention now. On Thu, Mar 12, 2009 at 12:06 PM, Martin wrote: > > Hi James (or anyone else), > > I am probably being daft, but what is the best way to deal with base > types using the new conventions overhaul. > In short what

[fluent-nhib] Re: Conventions overhaul

2009-03-12 Thread James Gregory
I'm not sure what you mean, are you using automapping? On Thu, Mar 12, 2009 at 12:58 PM, Adriano Machado wrote: > > James, > > Regarding inheritance and subclasses, how do I define the convention > for the primary key of the subclasses? > > On Mar 11, 8:22 pm, James

[fluent-nhib] Re: InnoDB Tables

2009-03-12 Thread James Gregory
n fluent nhibernate yet? It’s nothing to stress about, > I’m just curious. Maybe I can switch to all InnoDB tables, or in my dreams > to MS SQL 2008. > > > > > > *From:* fluent-nhibernate@googlegroups.com [mailto: > fluent-nhibern...@googlegroups.com] *On Behalf Of *Jam

[fluent-nhib] Re: AutoMappings strings always nvarchar(255)

2009-03-12 Thread James Gregory
Great! FYI, if you've got more than one convention you can use AddFromAssemblyOf instead of just Add to add them all. On Thu, Mar 12, 2009 at 6:33 PM, ComradeF wrote: > > > With the release of r394, this is fixed! Hooray. > > Here's how I accomplished the task at hand: > > public class MyCo

[fluent-nhib] Re: Conventions overhaul

2009-03-12 Thread James Gregory
one. I am not sure, but I think that's because the foreign > > key name resultant from my conventions are different of what's stated > > on AutoMapper.cs file. > > > > Thanks, > > > > Adriano > > > > On Mar 12, 10:40 am, James Gregory wro

[fluent-nhib] Re: JoinedSubClassPart

2009-03-12 Thread James Gregory
Have you got a working design using hbm.xml? If so then I can use that to debug FNH, if not, then I don't know if it's a problem with your particular setup or FNH in general. On Thu, Mar 12, 2009 at 9:00 PM, Craig van Nieuwkerk wrote: > > Thanks. It seems to be a pretty basic requirement for DDD t

[fluent-nhib] Re: JoinedSubClassPart

2009-03-12 Thread James Gregory
; assembly="LibrarySample.Model" > namespace="LibrarySample.Model"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > On Fri, Mar 13, 2009 at 8:52 AM, James Gregory > wrote: > > Have yo

[fluent-nhib] Oracle DB Configuration

2009-03-13 Thread James Gregory
Hello everyone, There's been quite a few requests and patches over the past few weeks for Oracle database configuration support. Well, David R. Longnecker contributed a patch some weeks ago, and after comparing his to the other patches submitted David's was also the most heavily tested. So I've app

[fluent-nhib] Re: Fluent generates partial reference assemblies

2009-03-13 Thread James Gregory
Just FYI, I've applied your patch. Thanks! On Wed, Mar 11, 2009 at 11:56 AM, James Gregory wrote: > I don't think there'll be a problem with always specifying the full name, I > can't see it doing any harm. > Easiest thing to do for a patch is use SVN to generate a

[fluent-nhib] Re: Composite Id with Components, is it possible?

2009-03-13 Thread James Gregory
As far as I'm aware components don't have IDs. Please clarify what you want to do. http://www.nhforge.org/doc/nh/en/#components On Fri, Mar 13, 2009 at 2:32 PM, epitka wrote: > > How do we map composite Id on components with fluent Nhibernate? Is it > possible? > > > --~--~-~--~~---

[fluent-nhib] Re: Id Naming Convention

2009-03-13 Thread James Gregory
WithSetup is for configuring the conventions that the automapper uses to discover the properties on your entities. If your property is Id but your column is TableNameId, then that is not what you want. http://wiki.fluentnhibernate.org/show/AutoMappingConventions That page on the wiki shows pretty

[fluent-nhib] Re: Id Naming Convention

2009-03-13 Thread James Gregory
erated xml > mapping was not valid. > > The TestAutoMapPropertySetFindPrimaryKeyConvention() unit test was the > thing I was looking for. > > Now I've to override conventions for my FK naming convention. > > On Mar 13, 5:22 pm, James Gregory wrote: > > Wit

[fluent-nhib] Re: Id Naming Convention

2009-03-13 Thread James Gregory
chema (with default conventions) : > > > > > > On Mar 13, 5:41 pm, James Gregory wrote: > > Martin: That's a pretty big oversight, I've created an > > issue<http://code.google.com/p/fluent-nhibernate/issues/detail?id=144 > >and > > will correct

[fluent-nhib] Re: Composite Id with Components, is it possible?

2009-03-13 Thread James Gregory
Try: UseCompositeId() .WithKeyProperty("xxx") .WithKeyProperty("yyy"); On Fri, Mar 13, 2009 at 6:14 PM, epitka wrote: > > This is what I meant. > http://nhforge.org/doc/nh/en/index.html#components-compositeid > > On Mar 13, 9:45 am, James Gregory wrote:

[fluent-nhib] Re: Conventions overhaul

2009-03-13 Thread James Gregory
Adriano Machado wrote: > > Isn't the case just to apply the IOneToOneConventions to the inherited > mappings (both Discriminated and joined subclasses)? > > On Mar 12, 4:45 pm, James Gregory wrote: > > Ah, I see your problem. You can have multiple column names for the ke

[fluent-nhib] Re: Id Naming Convention

2009-03-13 Thread James Gregory
Martin: Your issue should now be fixed, nearly everything now exposes an EntityType property. On Fri, Mar 13, 2009 at 5:00 PM, James Gregory wrote: > I was talking about primary keys, the foreign keys obviously have to be > generated. > > > On Fri, Mar 13, 2009 at 4:56 PM

[fluent-nhib] Re: Error when mapping field

2009-03-13 Thread James Gregory
Fields aren't supported currently, easiest fix is to make it a private autoproperty. private IList accountType { get; set; } On Fri, Mar 13, 2009 at 9:29 PM, epitka wrote: > > Hi, I am trying to map private field IList _accountType > like this > > HasMany(x => x._accountType).Access.AsField(); >

[fluent-nhib] Re: Composite Id with Components, is it possible?

2009-03-13 Thread James Gregory
ate) > .SetAttribute("class", > "ClientAccountTypeCompositeID"); > > but it throws > > {"The method or operation is not implemented."} > > > > On Mar 13, 1:20 pm, James Gregory wrote: > > Try: > > > > UseCom

[fluent-nhib] Re: Composite Key for resolving Many to Many Relationship

2009-03-13 Thread James Gregory
11, 3:50 pm, sianabanana wrote: > > I think thats where i was about to look next. > > > > I will do this and then update. > > > > Thanks again for the support so far, > > > > On Mar 11, 3:48 pm, James Gregory wrote: > > > > > >

[fluent-nhib] Re: Composite Id with Components, is it possible?

2009-03-13 Thread James Gregory
> On Fri, Mar 13, 2009 at 9:55 PM, epitka wrote: > > > > > I need something like this > > > > > UseCompositeId().WithKeyProperty(x => x.Id.ClientID).WithKeyProperty > > > (x => x.Id.EffectiveDate) > > > .SetAttribut

[fluent-nhib] Re: What about support auxiliary database objects?

2009-03-14 Thread James Gregory
You can't currently. Either use hbm.xml or traditional sql. On Sat, Mar 14, 2009 at 3:30 PM, Rub wrote: > > What about support auxiliary database objects? > This official nhibernate documentation: 5.6 > > http://www.hibernate.org/hib_docs/nhibernate/1.2/reference/en/html/mapping.html > > I want

[fluent-nhib] Re: Possible problem with IPropertyConvention

2009-03-14 Thread James Gregory
How recently did you update? Properties can have multiple columns and it was ambiguous whether you were setting the name or adding an extra one, I've since updated the code to make it a bit clearer. If I remember correctly your Apply should contain: target.ColumnNames.Clear(); // make sure there a

[fluent-nhib] Re: What about support auxiliary database objects?

2009-03-14 Thread James Gregory
Read the wiki: http://wiki.fluentnhibernate.org/show/FluentConfiguration 2009/3/14 Rub > > How can I work with fluent nhibernate class maps and hbm (embedded > resource files) together in FH? > > On 14 мар, 21:02, James Gregory wrote: > > You can't currently. Either

[fluent-nhib] Re: Possible problem with IPropertyConvention

2009-03-14 Thread James Gregory
Name.ToUpperCaseUnderscore()); >} >} > > > On Mar 14, 9:29 am, JohnRudolfLewis wrote: > > I forget the number, but it was from yesterday. I will try to rewrite > > considering what you just posted. (our posts crossed) > > > > On Mar 14, 9:16

[fluent-nhib] Re: Fields AutoMapping

2009-03-14 Thread James Gregory
You need to use Access.AsField() to inform FNH that the readonly property is backed by a field. On Sat, Mar 14, 2009 at 4:48 PM, Mike Chaliy wrote: > > In our development we are frequently using readonly properties backed > with private fields. > > Is there any way to automap such case? > From m

[fluent-nhib] Re: Possible problem with IPropertyConvention

2009-03-14 Thread James Gregory
of making the IPropertyConvention only > apply if I've not already explicitly specified a column name. > > On Mar 14, 9:58 am, James Gregory wrote: > > If your column names are sometimes reserved words, you can wrap them in > > backticks. So you could remove the explicit column na

[fluent-nhib] Re: Possible problem with IPropertyConvention

2009-03-14 Thread James Gregory
No problem :) On Sat, Mar 14, 2009 at 5:32 PM, JohnRudolfLewis wrote: > > Duh... Thanks. > > On Mar 14, 10:17 am, James Gregory wrote: > > What's wrong with this: > > public bool Accept(IProperty target) > > { > > return (target.ColumnNames.List().Coun

[fluent-nhib] Re: What about support auxiliary database objects?

2009-03-14 Thread James Gregory
Factory(), simple, I just need NHibernate.Configuration. > > On 14 мар, 21:55, James Gregory wrote: > > Read the wiki:http://wiki.fluentnhibernate.org/show/FluentConfiguration > > > > 2009/3/14 Rub > > > > > > > > > > > > > How can

[fluent-nhib] Re: ForTypesThatDeriveFrom and private fields

2009-03-14 Thread James Gregory
The key to what paul said is "private auto properties". Use an autoproperty, not a field. private string PasswordHash { get; set; } instead of private string PasswordHash; On Sat, Mar 14, 2009 at 5:59 PM, Nick Gieschen wrote: > > Hey, > > Not sure what you mean by this. As far as I can tell, Re

[fluent-nhib] Re: What about support auxiliary database objects?

2009-03-14 Thread James Gregory
; }) > .GetRawConfiguration(); > > Is it posible? > May I get ready NHibernate.Configuration object from some Fluent > NHibernate classes? > > On 15 мар, 00:01, James Gregory wrote: > > You can either pass an existing instance into the Fluently.Configure > method, &g

[fluent-nhib] Re: Fields AutoMapping

2009-03-14 Thread James Gregory
t; private string name; > public string Name{get{return this.name;}} > } > > On Mar 14, 7:00 pm, James Gregory wrote: > > You need to use Access.AsField() to inform FNH that the readonly property > is > > backed by a field. > > > > > > > > On Sa

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread James Gregory
Although the idea is sound, it unfortunately won't work as there's no way to ignore properties through conventions. Definitely something we need to implement. Unfortunately there's no workaround either. I've tried hacking something together, but I've wasted half an hour already with no luck. Sorry.

[fluent-nhib] Re: Fields AutoMapping

2009-03-14 Thread James Gregory
is you preferred pattern for readonly lists? > > > http://stackoverflow.com/questions/645918/what-is-the-best-practice-for-readonly-lists-in-nhibernate > > On Mar 15, 12:20 am, James Gregory wrote: > > You should be able to do this with a convention: > > > > public clas

[fluent-nhib] Re: Mapping issue

2009-03-14 Thread James Gregory
Consider it fixed. There's now a NotFound property on HasMany and HasManyToMany. On Sat, Mar 14, 2009 at 6:57 PM, Adam Dymitruk wrote: > Would a temporary work-around using views help? > > On Thu, Mar 12, 2009 at 8:19 AM, Andrew Burns wrote: > >> >> I also asked this on SO and it might be bette

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread James Gregory
wrote: > What's the purpose of the Accept() method then if it's not to ignore > certain properties? > > > On Sat, Mar 14, 2009 at 7:00 PM, James Gregory wrote: > >> Although the idea is sound, it unfortunately won't work as there's no way >> to igno

[fluent-nhib] Re: Can a Child have a list of Children items?

2009-03-15 Thread James Gregory
Could you show me some example classes? I don't want to make suggestions until I know exactly what you're trying to do. On Sun, Mar 15, 2009 at 5:55 PM, Bill wrote: > > Hi, > > I have a entity which has a list of Child1 objects. The mappings seem > to work fine for this. If I try to add a list o

[fluent-nhib] Re: Can a Child have a list of Children items?

2009-03-15 Thread James Gregory
{ get; set; } > >public virtual RouteObjNH RouteObjNH { get { return > _routeObj; } } > >public override bool Equals(object obj) >{ > return base.Equals(obj); >} > >public override int GetHashCode() >{ >

<    1   2   3   4   5   6   7   8   9   10   >