I'm beginning with FluentNH and I'm just thinking if it's possible to
combine standard ClassMaps with conventions approach. I think it's not
possible, but I'm rather asking... I'd like for example to define that
all string properties with name Description should map to DESCR
field with length 200
Did you see my message? Have you tried the PersistenceSpecification?
On Tue, Mar 10, 2009 at 1:55 PM, Brendan Erwin brendanjer...@gmail.comwrote:
Hmmm. I guess I imagined it. :)
The issues I'm having are things like string truncation errors and missing
not nulls. Any ideas how I can get
perfect - thanks a lot for quick response.
On 11 Bře, 09:49, James Gregory jagregory@gmail.com wrote:
Conventions can be applied to standard
ClassMaps.http://wiki.fluentnhibernate.org/show/StandardMappingConventions
On Wed, Mar 11, 2009 at 7:51 AM, Filip Kinsky fi...@filovo.net wrote:
I am doing manual mapping classes and I think I am stumped on this
one:
public class user
{
public int UserId { get; set; }
public string UserName { get; set; }
public IListRole Roles { get; set; }
}
Public Class Role
{
Public static Role AddPermit = New Role(1, AddPermit)
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 works for small byte
arrays (I'm guessing lessing than 8000 bytes).
I want to allow byte arrays
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 ITypeConvention
and register it with convention.AddTypeConvention(). This is okay? Is
there something more easy?
Hi list,
I posted an issue on the project site about Fluent Nhibernate
generating mappings with partial assembly names (i.e. AssemblyName
instead of AssemblyName, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a)
My operating environment (WSS :S) requires all assemblies to be
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
{
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
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
Yeah, I already use it. But it is really only effectively used against
a generated database ( freshly empty ) since the tests are not
idempotent.
I tried wrapping the tests in a transaction that I always rolled back,
but that didn't work.
I need either a test that just compares the schema
Ok, I got it.
It's an typeof(T).Assembly.GetName().FullName instead of typeof
(T).Assembly.GetName().Name
You think it's worthwhile to make this setting changeable in the
fluent config, or is it ok to always generate the full assembly name?
I'll send a patch with the changes. (What's the
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/mapping-a-state-pattern-with-nhibernate.aspx
But when I'm trying to persist my states I get error:
Invalid index 0 for this SqlParameterCollection with Count=0
Thanks, but I wouldn't waste your time. That sounds harsh, but there's going
to be a big conventions rewrite dropping very soon, I've got all the code
ready to commit and I'm just writing up the wiki changes now. So any changes
you make will be redundant very soon.
On Wed, Mar 11, 2009 at 12:42
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:
Same error if I remove map to superclass Name
public void CreateMap()
{
Id(s = s.Id);
//Map(x = x.Name);
DiscriminateSubClassesOnColumn(Name)
.SubClassSubClassType(m = m.Map(sc = sc.Name));
}
On Wed, Mar 11, 2009 at 1:48 PM, James Gregory jagregory@gmail.comwrote:
Wrong group, thought I was in NH forum
On Mar 10, 1:36 pm, epitka exptrade2...@yahoo.com wrote:
Probably silly question,
but can IdBag be used for One-To-Many or is it only for Many-To-Many
situations
--~--~-~--~~~---~--~~
You received this message because you
Ok, not a problem. You guys rock!
On 11 Бер, 14:46, James Gregory jagregory@gmail.com wrote:
Thanks, but I wouldn't waste your time. That sounds harsh, but there's going
to be a big conventions rewrite dropping very soon, I've got all the code
ready to commit and I'm just writing up the
Damn, well spotted. Looks like we haven't implemented support for this kind
of behavior yet. Sorry.
On Wed, Mar 11, 2009 at 2:50 PM, David Woods d...@solidhouse.com wrote:
I got the IUserType stuff to work using a Map() and CustomTypeIs but I
don't see a CustomTypeIs method on a HasMany(). Am
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
James Gregory wrote:
Damn, well spotted. Looks like we haven't implemented support for this
kind of
Tell me about it! ;)
On Wed, Mar 11, 2009 at 3:09 PM, David Woods d...@solidhouse.com 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
James
No more responses?
Any one can shed any light.
Here is the code from the example console application if anyone wants
to have a go?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate;
using Domain;
using FluentNHibernate.AutoMap;
using
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 helpful, because we don't fully understand them
ourselves. You have to appreciate that for FNH to support a feature, all we
If i swap the WithKeyRefrence to WithKeyProperty i get a mapping error
on start up.
It then cannot map the OrderProduct
I wouldnt know where to start making some test cases for this? I dont
know what you would expect to receive from me?
On Mar 11, 3:37 pm, 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
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 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
Is this applied to the trunk? I'm just facing simmilar problems (on
Oracle) - fields don't get length specified and FK names are generated
randomly even though I specify both in my conventions...
On 20 Ún, 01:47, Steven Lyons stevenly...@gmail.com wrote:
Take II: This patch passes the tests.
Sorry to bump this, but does anyone know what I need to do in order to
get nvarchar(max) for a string field when using AutoMapping? Or am I
going to have to manually alter the column after the database has been
created?
Thank you.
On Mar 6, 10:37 pm, ComradeF comra...@gmail.com wrote:
That
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 this
one:
public class user
{
public int UserId { get; set; }
public string UserName { get; set; }
public IListRole
@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
...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://wiki.fluentnhibernate.org/show/Conventions
- Convention
Nice work James. I see you implemented shortcuts, they look nice.
Now, lets have a chat about getting this into the semantic model 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
Sounds good, I'm out tomorrow but I'm free all weekend so I'll try to catch
you then.
On Wed, Mar 11, 2009 at 10:07 PM, Paul Batum paul.ba...@gmail.com wrote:
Nice work James. I see you implemented shortcuts, they look nice.
Now, lets have a chat about getting this into the semantic model
Dave I think you deserve some sort of award. I think your code sample must
be the first we've recieved that uses C# and VB interchangably :P
On Tue, Mar 10, 2009 at 4:13 AM, Dave Woods d...@solidhouse.com wrote:
I am doing manual mapping classes and I think I am stumped on this
one:
public
I am not sure if this a problem with my Fluent configuration or some
logic in my thinking.
Basically I have a Person class from which I have two inherited
classes, Author and Borrower (it's a library system). The mapping I
have is.
public class PersonMap : ClassMapPerson
{
35 matches
Mail list logo