I suspect you need a .Distinct()
--
Joe Brockhaus
joe.brockh...@gmail.com
On Tue, Oct 30, 2012 at 12:13 PM, rema wrote:
> That worked. Thanks.
>
> However, as my next requirement the class definition has changed to:
>
> public class Customer
> {
> public
ous purist rant reminiscent of MS trolling,
especially since you weren't helpful.. Personally, I think we're past that
age of the internet.
--
Joe Brockhaus
joe.brockh...@gmail.com
On Fri, Sep 28, 2012 at 3:40 AM, Ramon Smits wrote:
>
>>
>> Please
sounds like a good idea.
fyi, that column is considered a discriminator column, for when you want to
look into how to make nhibernate hydrate the correct type of entity based
on the row type.
--
Joe Brockhaus
joe.brockh...@gmail.com
On Fri, Jul 13, 2012 at 3:18 PM, Peter
rs on your References mapping in the BaseAddressMap.
--
Joe Brockhaus
joe.brockh...@gmail.com
On Wed, Jul 11, 2012 at 2:58 PM, Carl Bussema wrote:
> Are there any real differences between the different types of Address?
>
> Could you just use
>
&g
s(x => x.AddressTypeOne)
.Column("AddressTypeOneID"); // the column in ParentTable that
points to the address
base.References(x => x.AddressTypeTwo)
.Column("AddressTypeTwoID");
AddressMap
base.Id(x => x.ID);
// ...
--
Joe B
e-use)
ParentEntityTable
- ID
- ...
AddressTable
- ID
- ...
ParentAddress
- ParentID
- AddressID
OR (no address re-use)
(parent table same)
AddressTable
- ID
- ParentID
- ParentIDType (if parents are stored in various tables with overlapping
ids)
--
Joe Brockhaus
joe.brockh...@gmail.com
g location
newBLocation.Booking = newBooking; // set booking instance on booking location
newBooking.BookingLocations.Add(newBLocation); // add new booking
location to booking
--
Joe Brockhaus
joe.brockh...@gmail.com
On Wed, Mar 28, 2012 at 1:38 PM, Joe Brockhaus wrote:
> It d
tory.
This must not have been happening before. Did you change anything else
other than your mappings?
--
Joe Brockhaus
joe.brockh...@gmail.com
On Wed, Mar 28, 2012 at 1:29 PM, James Farrell wrote:
> Hey Joe,
>
> I got this working eventually, but instead of passing
I've replied to your S/O question
------
Joe Brockhaus
joe.brockh...@gmail.com
On Wed, Mar 28, 2012 at 7:30 AM, James Farrell wrote:
> Hi Everyone,
>
> I'm completely stuck on this problem:
>
>
> http://stackoverflow.com/questions/9904507/explicit-val
nsider. I'm not even sure if in NHproper you have
to do this, but I'm thinking it's the case.
--
Joe Brockhaus
joe.brockh...@gmail.com
On Wed, Feb 8, 2012 at 9:02 AM, Tim Scott wrote:
> Castle ActiveRecord also has mapping via attributes. A little simpl
-- Employee {ID = 1 }
- this is want you want
-- Customer { ID = 1 }
-- Project { ID = 2 }
-- Employee {ID = 3 }
So, as long as you are using Guids for IDs in all your entities that have
many addresses, you should be ok.
--
Joe Brockhaus
joe.brockh...@gmail.com
On Mo
BaseAddress is the Many side
and has no Reference back to Customer(and others).
So i appreciate any suggestions
Thanks
Peter
On 3 Feb., 15:49, Joe Brockhaus wrote:
> * does *it* (BaseAddressMap) have a References
> --
> Joe Brockhaus
> joe.brockh...@gmail.com
>
* does *it* (BaseAddressMap) have a References wrote:
> does it have a References
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
To unsubscribe from this group, sen
perhaps it would be good to know what's wrong?
does the BaseAddress table have a column of name "Foreignkey" ?
does it have a References(x=>x.Customer).Column("Foreignkey")
do you have other entities that derive from Customer?
--
Joe Brockhaus
joe.brockh...@gma
you might want to try the DistinctRootEntityResultTransformer
I use the Criteria API - not sure how you would do it with the Linq provider
var crit = session.CreateCriteria()
.Add(...)
.SetResultTransformer(new DistinctRootEntityResultTransformer());
--
Joe Brockhaus
joe.brockh
I, for one, am a bit jealous of the move to Australia. You and your summers
in my winters! ;-)
the absence is understandable
--
Joe Brockhaus
joe.brockh...@gmail.com
On Fri, Jan 27, 2012 at 5:20 AM, James Gregory wrote:
> Sorry everyone for my absence. I've been
osed
return.
it seems post approval was removed .. perhaps that's an indication of
something?
--
Joe Brockhaus
joe.brockh...@gmail.com
On Thu, Jan 26, 2012 at 3:37 PM, tbushell wrote:
>
> > I personally do not like the NH fluent mappings at all, and would rather
>
r.
now that NH itself has code-first/fluent configuration ability .. are there
really features & functionality FNH offers that the NH core doesn't?
--
Joe Brockhaus
joe.brockh...@gmail.com
--
On Wed, Jan 25, 2012 at 1:09 PM, tbushell wrote:
> I'd like to know that too,
ah hah!
well that's odd. is spec# dead, then?
------
Joe Brockhaus
joe.brockh...@gmail.com
On Mon, Dec 19, 2011 at 4:29 PM, Miguel Alves wrote:
>
> The problem is that Spec# works with .Net v2 and the lambda expressions
> are from the version 3 so it's not pos
: 12/18/2011 10:48 AM
To: Joe Brockhaus
Subject: Re: [fluent-nhib] FluentNHibernate + Spec#
The error is at Id(*x=>x.Id*) and
*m*.FluentMappings.AddFromAssemblyOf().ExportTo(@"C:\Users\Administrator\Documents\Visual
Studio
2010\Projects\DevelopmentManagerNotVerified\DevelopmentManagerNot
Phone
--
From: Joe Brockhaus
Sent: 12/18/2011 10:36 AM
To: Miguel Alves; Fluent NHibernate
Subject: RE: [fluent-nhib] FluentNHibernate + Spec#
I've never used spec# but it doesnt seem lile your problem is that.
It seems like your project isn't targeting the rig
d make sure the compilation target version
is not .net 2.0
What version of visual studio are you using?
Sent from my Windows Phone
--
From: Miguel Alves
Sent: 12/18/2011 1:50 AM
To: Joe Brockhaus
Subject: Re: [fluent-nhib] FluentNHibernate + Spec#
For example if I ha
Does everything compile if you omit
Id(x=>x.Id);?
Sent from my Windows Phone
From: Miguel Alves
Sent: 12/18/2011 1:02 AM
To: Fluent NHibernate
Subject: [fluent-nhib] FluentNHibernate + Spec#
Hello,
I am developing a project using Spec#. I was wondering if Spec# and
FluentNHibernate are compatibl
you'll have to add a reference to HibernatingRhinos.Profiler.Appender.v4.0
then in your app when it starts up..
NHibernateProfiler.Initialize();
------
Joe Brockhaus
joe.brockh...@gmail.com
On Thu, Nov 10, 2011 at 2:45 PM, kimbered wrote:
> Hi!
>
> Thank
also, can you post your mappings?
--
Joe Brockhaus
joe.brockh...@gmail.com
On Thu, Nov 10, 2011 at 10:43 AM, Oskar Berggren
wrote:
> Joins can also be given in the mappings. Use nhprof or regular logging
> to a text file to get the exact SQL executed.
>
> /Oskar
&
, would be a big help.
Also, I'd fire up NHProf to see what is being executed, so you can execute
the same query in your external DB tool .. as the results might give you
some insight.
------
Joe Brockhaus
joe.brockh...@gmail.com
On Wed, Nov 9, 2011 at 4:28 PM, Oskar Berggren
also, you will probably get better help in the nhusers group, as this is
primarily the fluent-specific group
--
Joe Brockhaus
joe.brockh...@gmail.com
On Thu, Nov 10, 2011 at 9:42 AM, Joe Brockhaus wrote:
> I think you're right in thinking that your code shoul
o you have NHProfiler running? If not, I would suggest using it to
hopefully get a better understanding of what's going on.
--
Joe Brockhaus
joe.brockh...@gmail.com
On Wed, Nov 9, 2011 at 7:22 PM, The Last Ottoman
wrote:
> Hi all,
>
> I used unit-of-work pattern all
does using Linq like that, with a select, equate to projections with
criteria? (aka, would it ignore fetching an association that is not included
in the select, that might be mapped with a join? it's just much more legible
than criteria :D)
------
Joe Brockhaus
joe.brockh...@gmai
> I'm sorry if this is an EXTREMELY noobish question!
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Fluent NHibernate" group.
>> > To post to this group, send email to fluent-nhibernate
> fluent-nhibernate+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/fluent-nhibernate?hl=en.
>
>
--
Sent from my mobile device
--
Joe Brockhaus
joe.brockh...@gmail.com
--
You received this message because you are
sorry. premature send.
public class MyMap: Classmap
{
public const string TABLE = "MY_TABLE";
public static class Fields
{
public const string MY_ID = "MY_ID";
public const string FIELD_1 = "FIELD_1";
}
public MyMap()
{
base.Table(MyMap.TABLE);
base.
the Map, Table, Id methods all have an overload that takes a string for the
DB column name.
ie:
public class MyMap: Classmap
{
public static class Fields
public MyMap()
{
base.Id(x=>x.Id,
}
}
--
Joe Brockhaus
joe.brockh...@gmail.com
On Sat, Sep 17, 2011
not that you might not get the answer here .. just that it's more active I
think than this, and it seems like an NH question, rather than an FNH one.
(I've had trouble ascertaining the ability to map things one way for one
action and then another way for another action. )
--
You received this mes
you might be better off seeing if this is possible by asking in the nhusers
group first
--
Joe Brockhaus
joe.brockh...@gmail.com
On Mon, Aug 8, 2011 at 11:45 AM, Steve wrote:
> Hi there,
>
> I'm new to NHibernate and am trying to build my first simple website.
&
sorry for not being more familiar with this process, but what should I do to
update my project with the latest NH without breaking FNH or other items
like iesi/castle/cache providers? (understand those last 3 aren't really
this list's responsibility..)
--
Joe Brockhaus
joe.brockh...
ite cache from the parent, and
the child mapping also has read-write & not lazy set.
Will upping batch-size improve performance for me?
--
Joe Brockhaus
joe.brockh...@gmail.com
--
On Thu, Jun 23, 2011 at 11:32 AM, Oskar Berggren
wrote:
> batch-size in your mappings.
>
> /Oskar
ooh, gotcha.
thanks
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
To unsubscribe from this group, send email to
fluent-nhibernate+unsubscr...@googlegroups.com.
For
Rasmoo, when you say FK's .. do you mean FK id properties (using Map()), or
FK objects which reference FK columns (through the object mapping) in the DB
(that are otherwise *not* mapped via fluent via a Map())
------
Joe Brockhaus
joe.brockh...@gmail.com
On Mon, Apr 25, 2011
no clue if this will work, but did you try .Generate.Always() ?
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
To unsubscribe from this group, send email to
fluent-n
well, so far this discussion has been about the community's (or at least a
loud subset) disagreement with Microsoft's take on the matter.
I'm not trying nor wanting to get into the middle of that.
People are starting an argument with me about my domain. A domain which
doesn't prevent me from accom
lol. i'd donate to the cause but i dont think it would make you think any
deeper than where you stopped, which was "boo your entity has a FK in it,
and even tho it shouldnt matter (and even tho NHib should be able to work
around it), i'm going to stop helping you because i dont like how you're
doin
i'm sorry, you got the attitude first.
non-answers, personal-opinion-first responses ... i didn't come here asking
to get into a jousting match about your preference, did i? I asked how i
would do something, given the expertise of the community.
--
You received this message because you are subsc
or, if what i'm trying to do won't work because NHib is getting confused
about a TicketID property on my domain with the same name as the TicketID
column in the database, you could suggest that I put another column on my
table that is GarbageColumnToEaseJamesMind and a property in my domain to
matc
or you could answer all of my questions by prefacing your response with "If
you take the TicketID property out of your domain ... "
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googl
OK fine.
forget my entity doesn't have another property which just happens to be a
FK.
wow magic! look it's gone! you don't have to be confused anymore.
Now ... how about answering all of the questions which don't have anything
to do with that?
Or if you need something easier, help me translate
ecause YOU or I know that TicketID is a FK, doesn't mean NHib
does, right -- It should just be another field. A field that is read from
the database AFTER the row is inserted or updated?
--
Joe Brockhaus
joe.brockh...@gmail.com
On Sat, Feb 5, 2011 at 7:27 PM, Joe Br
James, what are your thoughts on this?
http://www.codeproject.com/KB/silverlight/Ria_and_Nhibernate.aspx?msg=3759599#xx3759599xx
Seems to be a working example.
Furthermore, if NHib doesn't need my FK in the entity, then so be it.
How can i keep FNH from caring that my entity has the property?
If I
google has done that to me enough that i never reply on the site.
As for everything else -- I'll have to think about the situation a little
more.
I'm still going to make it work -- just not sure how, atm.
Then the official answer won't be, "sorry, that kind of complicated isn't
supported" ;-)
--
If i add:
Cascade.SaveUpdate() to the HasMany() in TicketMap && Not.Insert() on
the NoteMap References()
.. save scenario no longer works: error is that the FK doesn't exist.
-- unlike before, the Note Insert is NOT getting the updated TicketID.
(though, I don't know if this is because of Not
inserting those 4 items (1 ticket, 3 notes): 1 insert Ticket,
3 Insert Note (with valid FK's, assuming i order it all correctly into the
session), and 3 Update Note (updating values which are already valid and
inserted).
I'm really hoping you can make sense of all that. I made it as cle
s there another, better way to solve this? Just seems
counter-intuitive...but I suppose if you were foreign-keying off a column
that you weren't mapping, then you wouldn't want to force References() to
have an expression to map the field?
--
Joe Brockhaus
joe.brockh...@gmail.com
nevermind the List question. I don't have indexes stored with the rowdata.
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhibernate@googlegroups.com.
To unsubscribe from this group, send email t
for simple collections (non-dictionary):
i have my Domain posted here: http://j.mp/eOI3qS
1) What is the difference between AsBag() and AsList(), and how can i use
AsList()? Should I?
2) Are the KeyColumn, Column, and ForeignKey all required? What do the
various combinations of these methods mean
NSes?)
* ID TYPE *
EntityBase ->1 "EntityBase"
EntityChildA -> 2 "EntityChildA"
EntityChildB -> 3 "EntityChildB"
--
Joe Brockhaus
joe.brockh...@gmail.com
On
were you able to find a solution to your problem?
i'm having the same issue. er well, that is the same problem finding how to
do it correctly.
--
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post to this group, send email to fluent-nhib
se I couldn't change the CLR User object to have all
virtual properties :-x. I suppose what I did for User I could do for all
these other types ... )
--
Joe Brockhaus
joe.brockh...@gmail.com
--
On Thu, Jan 27, 2011 at 4:37 AM, James Gregory wrote:
> You're not doing basic i
ok, if no one can answer, can someone point me in the direction of the
hard-to-find documentation for BASIC inheritance mapping?
--
Joe Brockhaus
joe.brockh...@gmail.com
--
On Mon, Jan 24, 2011 at 7:29 PM, Joe Brockhaus wrote:
> I should add this is obviously not how i would like
I should add this is obviously not how i would like to have
architechted the database
On 1/24/11, Joe Brockhaus wrote:
> for my 'easy' example, it would seem as though table-per-class is what i
> need.
>
> How does one map that, Fluently? Documentation on this is l
ference/en/html/inheritance.html
)
Does anyone know if that Is that ONLY for that metaphor? If not, am I
limited to *not *using abstract in TPC?
Thanks
--
Joe Brockhaus
joe.brockh...@gmail.com
--
On Mon, Jan 24, 2011 at 1:36 PM, Joe Brockhaus wrote:
> OK, then I suppose ignore
ide string SubTypeType {get {return "A";} }
}
public class EntityChild3B : EntityBase
{
public string 3BCustomProperty {get;set;}
public override string Type {get {return "3B";} }
public override string SubTypeType {get {return "B";} }
}
Thanks =)
--
Joe Broc
i just mean that I have more to do than spend work time doing what i should
do in my free time.
like i was saying before - we haven't run into an issue (keeping fingers
crossed). That's why i wouldn't ask :)
--
Joe Brockhaus
joe.brockh...@gmail.com
--
On Fri, Dec 10,
so it's kinda like a spork? (spoon-fed fork)
i'll /fail myself on that one, but i couldn't resist ;p
--
Joe Brockhaus
joe.brockh...@gmail.com
--
On Fri, Dec 10, 2010 at 12:24 PM, James Gregory wrote:
> Two days ago :)
>
> Obviously I forgot
ported FNH?
I'd like to be able to take the time to do this, but I can't bill my client
for open source work lol
--
Joe Brockhaus
--
On Fri, Dec 10, 2010 at 12:05 PM, James Gregory wrote:
> Prior to NH3 LINQ was a separate assembly. It was actually a contrib
> project.
more importantly, you can already use the NH3.0 Linq assembly with 2.x :-0
not sure if that's intentional, but it works, at least in my case (so far!)
------
Joe Brockhaus
--
On Fri, Dec 10, 2010 at 11:03 AM, Stacey Thornton <
stacey.cielia.l...@gmail.com> wrote:
> Quick Q
I'm not sure how relevant this is to the solution to the sequenced
generators (obviously not an Oracle wizard), but I've been told they have
sprocs wrapping them so I can get a new ID this way.
--
Joe Brockhaus
joe.brockh...@gmail.com
--
On Fri, Nov 19, 2010 at 11:18 AM, Joe
y to push
those values closer to the actual commit time, I feel that would be best.
(Not that we've identified any issue with that, yet, just trying to cover my
bases..)
Thanks for all your help!
~Joe
--
Joe Brockhaus
joe.brockh...@gmail.com
--
On Fri, Nov 19, 2010 at 9:14 AM,
.SomeCustomField1)
I imagine i would start like so:
TicketBaseMap : ClassMap where T : TicketBase
... but from there I'm not sure.
Thanks!
--
Joe Brockhaus
joe.brockh...@gmail.com
--
2010/11/14 Asbjørn Ulsberg
> On Wed, 10 Nov 2010 15:17:31 +0100, fel0nious wrote:
>
&g
68 matches
Mail list logo