Excellent, thanks Jeremy, I will take a look at this tonight.
On Tue, Mar 31, 2009 at 10:34 AM, Jeremy Wadsack
wrote:
>
> I'm having the same problem. It doesn't generate the element
> for the HBM. Here's some relevant code:
>
>
>
> MODEL:
>
> public class Module
> {
> public virtual Test[] Te
I'm having the same problem. It doesn't generate the element
for the HBM. Here's some relevant code:
MODEL:
public class Module
{
public virtual Test[] Tests { get; set; }
}
MAPPING:
HasManyToMany(x => x.Tests)
.WithTableName("t_module_test")
.WithParentKe
Ah, forgot to update the wiki! It's now updated.
On Mon, Mar 30, 2009 at 11:15 PM, depaulo wrote:
>
> AAAGH! Sorry! I since read DG's reply properly (I was copying your
> code from the website tutorial which needs to be updated). Added the
> Cascade.All() and it now works. Oops.
>
> On Mar 30, 11
AAAGH! Sorry! I since read DG's reply properly (I was copying your
code from the website tutorial which needs to be updated). Added the
Cascade.All() and it now works. Oops.
On Mar 30, 11:03 pm, depaulo wrote:
> I am afraid I have the same problem and am using the latest code from
> the reposito
I am afraid I have the same problem and am using the latest code from
the repository (revision 432).
All the tables are saving apart from the Employee table (I am using
SQL Server 2005)
Any help appreciated!
On Mar 25, 10:09 pm, James Gregory wrote:
> Great, glad that fixed it.
> And yes, that's
Hi
I'm creating an application with possibility of adding plugins and I'd like
to use fluent nhibernate for entity mappings. But I've got a problem with
lack of simple way of creating subclasses without modifying a classmap of
base class. Let's say I've got some core assembly with mapping of
'Simp
You could go that route, but that's messy, and in my experience will
only end in tears for you :)
If it's a legacy database, and you can't change the schema (otherwise
you'd obviously be normalizing it a bit better), then alternatively
you can create a Formula mapping:
Map(x => x.County).FormulaI
Hudson,
Thanks for your suggestions. I had considered this before, but in my
case this won't work because we have a UserCounties table that
determines which counties a User has access (it is used in a Many to
Many relationship, so this table is not mapped to an object). This
table actually has
Technically, you can't. Not directly like that. This is a NHibernate
Limitation, not a Fluent limitation.
What you need to do to get around it, is to set up a CompositeID
mapping in your CountyMap, this would replace your "CountyID". The
method is .UseCompositeID() on the ClassMap for CountyMap,
Hey guys,
I have an issue where our legacy database model isn't exactly
normalized- we have a list of Projects that need a County associated
with them. In the Counties database we have a CountyID for the
Primary Key, but in the Projects database we do not-- I need to map
the County and Location_
James,
Gotcha. Sorry, must be brain drain.
By the way you can have the extension method as I have written it with
the same name, it doesn't conflict.
I know it may be a bit hacky but would you object to bunging the
extension method in the trunk.
I know it is a little bit hacky but it see
*Martin:* It wouldn't, it's the lack of the collection that affects the
conventions.
We used to have two methods ColumnName, and ColumnNames, both were
cumulative and resulted in you being unable to effectively use conventions
to specify the column name. Your convention would just end up adding a
c
Seems fair to me.
@PaulYoder, if you can't wait for the rewrite you could add your own
extension method like so:
public static class FluentNHExtensions
{
public static IProperty ColumnNames(this IProperty property,
params string[] columnNames)
{
property.
I think the way to go for this is to follow Jon's suggestion of having a
single parameter method that can be used for if there's only one column, and
the (currently available) collection property for use when you need to have
more than one column, or if you need to modify or interrogate the collect
Again, we had this previously and it suffers from the problem of not being
able to interrogate or modify the collection at convention time.
On Mon, Mar 30, 2009 at 4:06 PM, Paul Yoder wrote:
> What about using a params string array in the method parameter to support
> single and multiple column
What about using a params string array in the method parameter to support
single and multiple column names?
So instead of
Map(x => x.BusinessName).ColumnNames(c =>
{
c.AddColumn("FirmCol1");
c.AddColumn("FirmCol2");
}
it could be
Map(x => x.BusinessName).ColumnNames("FirmCol1", "FirmCol2");
Hi All,
I'm all new and fresh on C# but not on hibernate, but im somewhat lost
when it comes to inheritance and the use of Fluent in this case.
I have a Table called Property which has one or many PropertyFeatures.
Now Property Features can either be a Service, Inclusion or a feature
and these a
I apologize in advance if this question has been answered many times
over. How can I specify the session context using the Fluent
configuration? In other words, what is the Fluent translation of a
traditional xml mapping like "thread_static"?
--~--~-~--~~~---~--~--
You said it yourself, its not so fluent. This approach reduces the
readability of the code.
On Mon, Mar 30, 2009 at 9:52 PM, NiHique wrote:
>
> What about: Map(x => x.BusinessName, "FirmName");
>
> It is shorter and works pretty well, also with Identity ok, not so
> fluent but still pretty s
What about: Map(x => x.BusinessName, "FirmName");
It is shorter and works pretty well, also with Identity ok, not so
fluent but still pretty straightforward;)
On Mar 29, 11:15 am, James Gregory wrote:
> I'm ok with that... :)
>
> On 3/29/09, Jon Kruger wrote:
>
> > Right, but couldn't you
20 matches
Mail list logo