I am trying to convert over to new conventions
I used to use these conventions
GetPrimaryKeyNameFromType = type => type.Name + "Id",
GetManyToManyTableName = (parent, child) => parent.Name + "_" +
child.Name,
GetForeignKeyNameOfParent = type => type.Name + "Id",
GetForeignKeyName = type => type.N
Bump! anyone with any ideas?
On Mar 1, 1:24 pm, sianabanana wrote:
> Hi,
>
> I have a One - To - One relationship
>
> Product may have 0 or 1 CustomItem
> CustomItem refrences Product
>
> my database model simplified is
>
> Product table - columns - ProductId, C
Hi,
I have a One - To - One relationship
Product may have 0 or 1 CustomItem
CustomItem refrences Product
my database model simplified is
Product table - columns - ProductId, CutomItemId
Custom Item table - columns - CustomItemid, Additional information
public class Product
{
public
OrderID and ProductId it might work.
But i think the problem is that it cannot cope with the complex types
that im trying to implement.
Order and Product.
Anyone else have any ideas about this?
On Mar 11, 3:50 pm, sianabanana wrote:
> I think thats where i was about to look next.
>
>
NHibernate using the xml
> mappings. If you can succeed at that, then we can compare the mappings
> you're using with that to what FNH is generating
>
> read more »
>
>
>
> On Wed, Mar 11, 2009 at 3:42 PM, sianabanana wrote:
>
> > If i swap the WithKey
> bug it never regresses. A console app will require one of us to derive tests
> from it, which takes more work
>
> read more »
>
> It may be my naïvety showing, but I believe you should be using
> WithKeyProperty rather than WithKeyReference. I could be wrong though.
>
>
//.WithForeignKey("Id").TheColumnNameIs("OrderId");
//map.References(x => x.Product)
//.WithForeignKey("Id").TheColumnNameIs("ProductId");
}
}
}
On Mar 10, 11:14 am, sianabanana wrote:
> I do under
derProduct would probably resolve your issue, plus is the recommended
> best practice now a days.
>
> Cheers
>
> Andy
>
>
>
>
>
> On Tue, Mar 10, 2009 at 10:12 AM, sianabanana wrote:
>
> > Any ideas james,
>
> > I have tested deleting updating and sele
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
> minimum needed to reproduce the problem.
>
>
>
> On Sun, Mar 8, 2009 at 12
ve your entities? Even
> more helpful would be if you could reduce your mappings down to the bare
> minimum needed to reproduce the problem.
>
>
>
> On Sun, Mar 8, 2009 at 12:07 AM, sianabanana wrote:
>
> > Any ideas? I could really do with some help on this one.
>
Any ideas? I could really do with some help on this one.
Much appriciated :)
On Mar 6, 11:40 pm, sianabanana wrote:
> I have a more complex many to many relationship and need to create the
> link between the manys as an object to store further data.
>
> Order - id, date
>
I have a more complex many to many relationship and need to create the
link between the manys as an object to store further data.
Order - id, date
Order Product - orderid, productid, quantity
Product - id, name
I am using auto mapping, and i am overriding the mapping to specify
anything that
12 matches
Mail list logo