Hi,
The PK for enlisted is composed of groupid and member Id.
I can add a Indentity surrogate key (although It is completely useless
- but for NH sake...)
I though that I can map the group class with has-many to the
enlistedmember class.
and map the enlistedmember class with has-one to the member
Check your cascade operations ... Are you cascading all? Be careful
with cascades ... they can cause this type of behavior.
HTH,
John
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Fluent NHibernate" group.
To post
How can I set the constraint name on foreign keys using conventions?
I know it is possible on the mapping, like:
mapping.HasMany(x => x.Children).ForeignKeyConstraintName
("FK_Something")
But I want to do something like:
public class HasManyConvention : IHasManyConvention
{
#regi
You problem with EnlistedMebmer table is that you don't have PK -
which is generally highly not recommended. Can't you just add
autoincremented PK there and here you go?
Another issue is that you don't want your EnlistedMebmer to be an
entity. However, as pointed many times by others (in "NHibern
Mikael,
After tinkering with Conventions for a while, I'm convinced to use
Fluent over XML Configuration.
Thanks for your time.
Mark
On Sep 21, 11:15 am, Mikael Henriksson wrote:
> Almost correct you should use: *
> .Conventions.AddFromAssemblyOf()*
>
> On Mon, Sep 21, 2009 at 5:09 PM, Ma
I have as problem with NH. When I remove a product from
FirstExample.Store (Id==1) NH is doing this:
DELETE FROM StoreProduct WHERE Store_id = 1
INSERT INTO StoreProduct (Store_id, Product_id) VALUES (1 ,2)
INSERT INTO StoreProduct (Store_id, Product_id) VALUES (1 ,3)
INSERT INTO StoreProduc
Hi,
I am trying to combine FluentMapping with Conventions. Most of the
documentation combines AutoMapping and Conventions.
http://aleris.wordpress.com/2009/03/28/combining-explicit-mappings-and-conventions-in-fluent-nhibernate/
describes an approach, but it no longer matches the API.
ISessi
I have as problem with NH. When I remove a product from
FirstExample.Store (Id==1) NH is doing this:
DELETE FROM StoreProduct
WHERE Store_id = 1 /* @p0 */
INSERT INTO StoreProduct
(Store_id,
Product_id)
VALUES (1 /* @p0 */,2 /* @p1 */)
INSERT INTO StoreProduct
Almost correct you should use: *
.Conventions.AddFromAssemblyOf()*
On Mon, Sep 21, 2009 at 5:09 PM, Mark Phillips wrote:
>
> Hi,
>
> I am trying to combine FluentMapping with Conventions. Most of the
> documentation combines AutoMapping and Conventions.
>
>
> http://aleris.wordpress.com/2009/03
Hey All,
Well I got a little rest this weekend and dug at the problem a little
more today. It looks like the problem is that if you have more than
one self-referencing relationship in the same table things get messed
up. All I ended up needing to do was add a check to see if the tables
the rela
Eric,
Thanks for the reply.
I looked on the web for instructions on how to combine fluent mappings with
conventions and the instructions don't match the API. For example I got
this from
http://aleris.wordpress.com/2009/03/28/combining-explicit-mappings-and-conventions-in-fluent-nhibernate/
:
I
Hi,
I've posted this question in several places with no concrete answer:
I'm trying to map a many to many relation with data in the link table:
I'm using the FNH 1.0 RTM.
this is my db:
tblGroups: GroupID GroupName
tblMembersInGroup: GroupID MemberID Rank
tblMembers: MemberID, Name
this is my
12 matches
Mail list logo