[fluent-nhib] Re: how to create convention for sequence name for identity mapping (Oracle)?

2009-02-19 Thread James Gregory
Unfortunately there isn't support for this currently. There was an issuehttp://code.google.com/p/fluent-nhibernate/issues/detail?id=81created for this a while back, but nobody's claimed it yet. On Thu, Feb 19, 2009 at 7:55 AM, Filip Kinsky fi...@filovo.net wrote: Maybe I just can't see

[fluent-nhib] Re: Add multiple mappings

2009-02-19 Thread James Gregory
, Feb 19, 2009 at 12:42 PM, James Gregory jagregory@gmail.comwrote: Hi Martin, 1. I'd not considered this usage, but it seems sensible. I'll make the required changes so you can call Mappings multiple times. 2. This is difficult, because while the containers have the same purpose, they don't

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

2009-02-19 Thread James Gregory
There was a bug in the Not.Nullable code that I've just fixed, could you confirm (or deny) whether this has had any affect on your problem? On Thu, Feb 19, 2009 at 12:09 AM, Steven Lyons stevenly...@gmail.comwrote: Hi All, I'm having a weird problem that hopefully someone might have some

[fluent-nhib] Re: How do I configure a session factory for oracle?

2009-02-19 Thread James Gregory
that didn't exist in my Oracle.DataAccess class On Feb 19, 6:05 am, James Gregory jagregory@gmail.com wrote: Good link Filip, I didn't know that existed. It's a shame people don't submit things like that as patches. On Thu, Feb 19, 2009 at 7:57 AM, Filip Kinsky fi...@filovo.net wrote

[fluent-nhib] Re: Mapping enums to INT values - not strings

2009-02-19 Thread James Gregory
When was the last time you did an update? There was a bug relating to this that I fixed about an hour ago. On Thu, Feb 19, 2009 at 2:54 PM, Tom Warnat war...@mauve.de wrote: This does not seem to work with MySQL. The SQL Query is something like this: Create table foo ( FooID

[fluent-nhib] Re: Newbie message

2009-02-19 Thread James Gregory
I just meant to say that it would be great if this tool became part of NHibernate itself, maybe in the Contrib project. Could you explain why you think this would be a good thing? I'm interested because I actually made the opposite decision recently, and would like to hear opinions for the

[fluent-nhib] Re: Fwd: FNH patch

2009-02-19 Thread James Gregory
Thanks Jimit, I will review and apply these as soon as I get the opportunity. Time is short right now. On Thu, Feb 19, 2009 at 6:03 PM, Jimit Ndiaye jimitndi...@gmail.com wrote: Sent from my iPhone Begin forwarded message: The attached patch contains the following: 1) Added support for

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

2009-02-19 Thread James Gregory
. On Feb 19, 9:35 am, James Gregory jagregory@gmail.com wrote: There was a bug in the Not.Nullable code that I've just fixed, could you confirm (or deny) whether this has had any affect on your problem? On Thu, Feb 19, 2009 at 12:09 AM, Steven Lyons stevenly...@gmail.com wrote

[fluent-nhib] Re: Now Where should I start

2009-02-20 Thread James Gregory
Paul, Andy: I've been working on a rather large rewrite of conventions for trunk, so I've got that one covered. I currently have all the changes in a local git branch, but I'll try to get it pushed to a public svn one so you guys can take a look (if you're interested). Paul, obviously we don't

[fluent-nhib] Re: Newbie message

2009-02-20 Thread James Gregory
My decision was very much driven from a project management point of view, so it's been interesting to hear your perspective as a user; I will bare your comments in mind next time I come to consider Fluent NHibernate's place in the big scheme of things. I've just paid for a year's website hosting

[fluent-nhib] Re: Now Where should I start

2009-02-20 Thread James Gregory
The whole merge into svn is taking too long for a friday night, so I'll do it tomorrow. You get the general idea though, i'm sure. On Fri, Feb 20, 2009 at 7:03 PM, James Gregory jagregory@gmail.comwrote: Paul, Andy: I've been working on a rather large rewrite of conventions for trunk, so

[fluent-nhib] Re: Now Where should I start

2009-02-20 Thread James Gregory
Conventions svn branchhttp://code.google.com/p/fluent-nhibernate/source/browse/#svn/branches/conventions, most stuff is in src/FluentNHibernate/Conventions On Fri, Feb 20, 2009 at 7:29 PM, James Gregory jagregory@gmail.comwrote: The whole merge into svn is taking too long for a friday night

[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 paul.qu...@terraindigo.co.uk wrote: Hi, I'm working with a legacy Oracle DB with natural keys. A lot of the are char(10)...I have a

[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 andrew.awaij...@gmail.com wrote: I submitted an issue yesterday where fluent is creating both a joined- subclass and a subclass mapping for child entities of a base

[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,

[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 james.freiwi...@gmail.com 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

[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

[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 exptrade2...@yahoo.com 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

[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 exptrade2...@yahoo.com wrote: Ok I can do it like this Configuration cfg = LoadDefaultConfiguration(); _sessionFactory = Fluently.Configure (cfg).BuildSessionFactory(); but how do I add

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

2009-03-01 Thread James Gregory
step, Boolean completedSynchronously) +75 On Mar 1, 11:31 am, James Gregory jagregory@gmail.com wrote: That should work. Have you tested your config without Fluent? On 3/1/09, epitka exptrade2...@yahoo.com wrote: Ok I can do it like this Configuration cfg

[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

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

2009-03-01 Thread James Gregory
sense? On Mar 1, 12:30 pm, James Gregory jagregory@gmail.com 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 exptrade2...@yahoo.com wrote: Here is the full stack

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

2009-03-01 Thread James Gregory
))) .BuildSessionFactory(); On Mar 1, 1:21 pm, James Gregory jagregory@gmail.com wrote: Yeah, that makes sense. Your exception tells me that you haven't added any fluent mappings. You should just be able to use the code from your first email combined with the second. var cfg

[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 christian.crowhu...@btinternet.com wrote: I am trying to integrate FNH with the Session management functionality implemented in the uNhAddins project. It seems like I cannot

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

2009-03-03 Thread James Gregory
, joan }; foreach (var employee in employees) { session.SaveOrUpdate(employee); Console.WriteLine(employee.Id); } On Feb 12, 5:56 pm, James Gregory jagregory

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

2009-03-03 Thread James Gregory
, jack, sue, bill, joan }; foreach (var employee in employees) { session.SaveOrUpdate(employee); Console.WriteLine(employee.Id); } On Feb 12, 5:56 pm, James Gregory jagregory

[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%

[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

[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 implementationhttp://wiki.fluentnhibernate.org/show/AutoMappingTypeConventionswhich would handle your properties - you'd just need to handle the ids. public class ColumnNameConvention : ITypeConvention

[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 matteo.bagl...@gmail.comwrote: Hi, I read that Auto Mapping supported table-per-subclass inheritance strategy.

[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 mhnyb...@gmail.com wrote: I can not find the Where clause in the fluent mapping. If it's there can someone show me an example class name=Equipment where=EquipmentType=1 id

[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: How to add mappings based on a consistent convention?

2009-03-04 Thread James Gregory
, James Gregory jagregory@gmail.com wrote: There's nothing in FNH to do the actual name conversion, but you could create an ITypeConvention implementation http://wiki.fluentnhibernate.org/show/AutoMappingTypeConventionswhich would handle your properties - you'd just need to handle the ids

[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
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 jagregory@gmail.com wrote: Hey Kevin, Just so I understand correctly, it's the key-many-to-one element that should have a lazy

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

2009-03-05 Thread James Gregory
On Thu, Mar 5, 2009 at 3:20 AM, James Gregory jagregory@gmail.comwrote: 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 (or false) and need the inverse method

[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 crai...@gmail.comwrote: I am trying to configure fluent nHibernate and have this code Assembly mappingAssembly =

[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 aemam...@gmail.com wrote: Cause it's

[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 roger.h...@gmail.com wrote: Hi All, I've

[fluent-nhib] Re: DiscriminateSubClasses question

2009-03-06 Thread James Gregory
() 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 jagregory@gmail.com wrote: You don't normally have the discriminator

[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 jan.van.rysw...@gmail.comwrote: 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. class

[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

[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

[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

[fluent-nhib] Re: Testing against existing schema

2009-03-11 Thread James Gregory
:* fluent-nhibernate@googlegroups.com [ mailto:fluent-nhibernate@googlegroups.comfluent-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 schema There's

[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 CustomTypeIsMyUserType() on your Roles property. On Mon, Mar 9, 2009 at 5:13 PM, Dave Woods d...@solidhouse.com wrote: I am doing manual mapping classes and I think I am stumped on this one: public class user {

[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 m...@chaliy.name 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

[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 oscil...@gmail.com wrote: Hi list, I posted an issue on the project site about Fluent Nhibernate generating

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

2009-03-11 Thread James Gregory
(_customType); } } } On 11 Бер, 12:07, James Gregory jagregory@gmail.com wrote: That's the correct way. How much easier do you want? On Tue, Mar 10, 2009 at 3:25 PM, Mike Chaliy m...@chaliy.name wrote: Hi all, I have custom IUserType - UriUserType, how

[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 mffmar...@gmail.comwrote: I'm trying to map the state pattern to NH as this page tells me to do:

[fluent-nhib] Re: HasMany Type Safe Enums

2009-03-11 Thread James Gregory
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 CustomTypeIsMyUserType() on your Roles property. On Mon, Mar 9

[fluent-nhib] Re: HasMany Type Safe Enums

2009-03-11 Thread James Gregory
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 CustomTypeIsMyUserType() on your Roles property

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

2009-03-11 Thread James Gregory
:12 AM, sianabanana sianm...@hotmail.com wrote: Any ideas james, I have tested deleting updating and selecting, and this works. I just cant insert a record - as it tries to update. On Mar 8, 12:48 pm, James Gregory jagregory@gmail.com wrote: I'm not really familiar

[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

[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 bringe...@gmail.com wrote: Did you end up getting this to work? On Mar 9, 10:13 am, Dave Woods d...@solidhouse.com wrote: I am doing manual mapping classes and I think I am stumped on

[fluent-nhib] Re: Conventions overhaul

2009-03-11 Thread James Gregory
' 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 james.freiwi...@gmail.com wrote: Sounds excellent. On Mar 4, 8:10 am, James Gregory jagregory@gmail.com wrote: Guys, This email is a heads up

[fluent-nhib] Re: Conventions overhaul

2009-03-11 Thread James Gregory
branch... :) On Thu, Mar 12, 2009 at 8:39 AM, James Gregory jagregory@gmail.comwrote: ...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 dedicated pages to conventions. - Conventions http

[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 martin.hornag...@marstangroup.comwrote: Hi James (or anyone else), I am probably being daft, but what is the best way to deal with base types using the new

[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 adriano.mach...@gmail.com 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 Gregory

[fluent-nhib] Re: InnoDB Tables

2009-03-12 Thread James Gregory
? 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 *James Gregory *Sent:* Mittwoch, 11. März 2009 16:51 *To:* fluent

[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 comra...@gmail.com wrote: With the release of r394, this is fixed! Hooray. Here's how I accomplished the task at hand:

[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 crai...@gmail.comwrote: Thanks. It seems to be a pretty basic

[fluent-nhib] Re: JoinedSubClassPart

2009-03-12 Thread James Gregory
, James Gregory jagregory@gmail.com wrote: 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 crai...@gmail.com

[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 exptrade2...@yahoo.com 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
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 jagregory@gmail.com wrote: WithSetup is for configuring the conventions

[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 exptrade2...@yahoo.com wrote: This is what I meant. http://nhforge.org/doc/nh/en/index.html#components-compositeid On Mar 13, 9:45 am, James Gregory jagregory@gmail.com wrote

[fluent-nhib] Re: Conventions overhaul

2009-03-13 Thread James Gregory
...@gmail.com 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 jagregory@gmail.com wrote: Ah, I see your problem. You can have multiple column names for the key

[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 jagregory@gmail.comwrote: 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 IListAccountType accountType { get; set; } On Fri, Mar 13, 2009 at 9:29 PM, epitka exptrade2...@yahoo.com wrote: Hi, I am trying to map private field IListAccountType _accountType like this

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

2009-03-13 Thread James Gregory
) .SetAttribute(class, ClientAccountTypeCompositeID); but it throws {The method or operation is not implemented.} On Mar 13, 1:20 pm, James Gregory jagregory@gmail.com wrote: Try: UseCompositeId() .WithKeyProperty(xxx) .WithKeyProperty(yyy); On Fri, Mar 13, 2009 at 6:14 PM

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

2009-03-13 Thread James Gregory
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 jagregory@gmail.com wrote: Well, if you're not able to write tests, then another way would be to get the behavior you desire to work

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

2009-03-13 Thread James Gregory
is in the class attribute? composite-id name=CompId class=FooCompositeID key-property name=MedicareNumber/ key-property name=Dependent/ /composite-id On Mar 13, 5:09 pm, James Gregory jagregory@gmail.com wrote: Sorry but that's not supported. We support composite-ids

[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 ruboard@gmail.com wrote: What about support auxiliary database objects? This official nhibernate documentation: 5.6

[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

[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 ruboard@gmail.com How can I work with fluent nhibernate class maps and hbm (embedded resource files) together in FH? On 14 мар, 21:02, James Gregory jagregory@gmail.com wrote: You can't

[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 m...@chaliy.name wrote: In our development we are frequently using readonly properties backed with private fields. Is there any way to automap such

[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 jagregory@gmail.com wrote: If your column names are sometimes reserved words, you can wrap them in backticks. So you could remove the explicit column name from

[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 johnrle...@gmail.comwrote: Duh... Thanks. On Mar 14, 10:17 am, James Gregory jagregory@gmail.com wrote: What's wrong with this: public bool Accept(IProperty target) { return (target.ColumnNames.List().Count == 0

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

2009-03-14 Thread James Gregory
BuildSessionFactory(), simple, I just need NHibernate.Configuration. On 14 мар, 21:55, James Gregory jagregory@gmail.com wrote: Read the wiki:http://wiki.fluentnhibernate.org/show/FluentConfiguration 2009/3/14 Rub ruboard@gmail.com How can I work with fluent nhibernate class maps

[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 nickgiesc...@gmail.comwrote: Hey, Not sure what you mean by this. As far

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

2009-03-14 Thread James Gregory
NHibernate.Configuration object from some Fluent NHibernate classes? On 15 мар, 00:01, James Gregory jagregory@gmail.com wrote: You can either pass an existing instance into the Fluently.Configure method, or you can use BuildConfiguration. 2009/3/14 Rub ruboard@gmail.com How can I

[fluent-nhib] Re: Fields AutoMapping

2009-03-14 Thread James Gregory
;}} } On Mar 14, 7:00 pm, James Gregory jagregory@gmail.com wrote: 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 m...@chaliy.name wrote: In our development we are frequently using

[fluent-nhib] Re: Fields AutoMapping

2009-03-14 Thread James Gregory
://stackoverflow.com/questions/645918/what-is-the-best-practice-for-readonly-lists-in-nhibernate On Mar 15, 12:20 am, James Gregory jagregory@gmail.com wrote: You should be able to do this with a convention: public class AccessAsFieldConvention : IPropertyConvention { public bool Accept

[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 adymit...@gmail.com wrote: Would a temporary work-around using views help? On Thu, Mar 12, 2009 at 8:19 AM, Andrew Burns erebus...@gmail.com wrote: I also asked

[fluent-nhib] Re: ignoreproperty

2009-03-14 Thread James Gregory
...@gmail.com 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 jagregory@gmail.comwrote: Although the idea is sound, it unfortunately won't work as there's no way to ignore properties through

[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 agilemeis...@gmail.com wrote: Hi, I have a entity which has a list of Child1 objects. The mappings seem to work fine for this. If I

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

2009-03-15 Thread James Gregory
() { return base.GetHashCode(); } } If I get this to work then I have additional levels to add as you can see about with ShipmentList and EventList. thanks!! Bill On Mar 15, 2:03 pm, James Gregory jagregory@gmail.com wrote: Could you show me some example classes

[fluent-nhib] Re: SchemaUpdate and Fluent NH

2009-03-16 Thread James Gregory
It looks correct. On Mon, Mar 16, 2009 at 8:01 AM, Sushant mpsk2...@gmail.com wrote: Is my CODE correct? and Should I use SQL Server CE instead.. will it work there? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[fluent-nhib] Re: How to make IClassConvention or IIdConvention not override my ClassMap

2009-03-16 Thread James Gregory
There's a TableName property in IClassMap, so you could do: return string.IsNullOrEmpty(target.TableName) Similarly there's a GetColumnName() method on IIdentityPart. On Mon, Mar 16, 2009 at 3:07 PM, JohnRudolfLewis johnrle...@gmail.comwrote: I have a domain entity class with a silly long

[fluent-nhib] Re: One-To-Many with Composite Key

2009-03-17 Thread James Gregory
That looks like a bug. Have you updated recently? Because that looks like an outdated syntax. On 3/17/09, Bill agilemeis...@gmail.com wrote: Hi, I've seen some examples of a one-to-many relationship using a composite key in Fluent. I was looking at the mapping xml file that was generated

[fluent-nhib] Re: ForTypesThatDeriveFrom and private fields

2009-03-18 Thread James Gregory
an autoproperty, not a field. My question then is why hasn't field access been implemented? Is there a theoretical reason for not implementing it or is it a bug or just something that hasn't been implemented yet? On Mar 14, 12:03 pm, James Gregory jagregory@gmail.com wrote: The key to what paul

[fluent-nhib] Re: LazyLoad false

2009-03-18 Thread James Gregory
What do you mean for a single session? As far as mappings are concerned, you either set it or you don't. On Wed, Mar 18, 2009 at 8:55 AM, Tom Warnat war...@mauve.de wrote: Hi, is there a way to set for a single session LazyLoad = false? I tried to set it with SetAttribute(“lazy”,

[fluent-nhib] Re: LazyLoad false

2009-03-18 Thread James Gregory
, James Gregory jagregory@gmail.com wrote: What do you mean for a single session? As far as mappings are concerned, you either set it or you don't. On Wed, Mar 18, 2009 at 8:55 AM, Tom Warnat war...@mauve.de wrote: Hi, is there a way to set for a single session LazyLoad = false

[fluent-nhib] Re: WithTable optional=true

2009-03-18 Thread James Gregory
I think that's the only way currently, yes. On Wed, Mar 18, 2009 at 9:24 PM, brendanjerwin brendanjer...@gmail.comwrote: Am I missing the fluent way to get optional=true on the join element? Is m.SetAttribute(optional,true) the best current way?

[fluent-nhib] Re: Applying new style conventions to PersistenceModel

2009-03-19 Thread James Gregory
The wiki is full of information on the new conventions: http://wiki.fluentnhibernate.org/show/Conventions Best approach is to not use the PersistenceModel directly like you are, use the Fluent Configuration. http://wiki.fluentnhibernate.org/show/FluentConfiguration On Thu, Mar 19, 2009 at 4:16

[fluent-nhib] Re: HasMany Component Mapping - WithParentReference missing?

2009-03-19 Thread James Gregory
Looks like an oversight, unfortunately! On Thu, Mar 19, 2009 at 4:52 PM, brown-cow colbysbr...@gmail.com wrote: I'm trying to do a mapping for a Set of Components on an entity. Here's the mapping I have right now: ... HasMany(x = x.Properties) .AsSet()

[fluent-nhib] Re: HasMany Component Mapping - WithParentReference missing?

2009-03-19 Thread James Gregory
I've committed this change. On Thu, Mar 19, 2009 at 5:11 PM, James Gregory jagregory@gmail.comwrote: Well, I've 3 hours before I leave so you might see it before then. On Thu, Mar 19, 2009 at 5:07 PM, brown-cow colbysbr...@gmail.com wrote: Ok, good to know. Thanks for the quick reply

[fluent-nhib] Re: Problem with IIdConvention and AutoPersistanceModel.WithSetup

2009-03-19 Thread James Gregory
That looks correct to me. I guess the naming is not very revealing, but what they PrimaryKeyConvention actually does is sets the *column name* of the primary key, not what the property should be called. So you still need to use the FindIdentity method to tell the automapper what your identities

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