Hello all! I am trying to set up my first ActiveRecord project, and
I've been successful connecting to one table and doing some simple
updates and inserts into one table. Now I am trying to create a
relationship to a child table, but I am getting the following message
"Association references unmapped class: AffiliateUser"
I am not sure what I'm doing wrong, but I feel that the problem lies
in the HasMany I have defined ...
I have in the Affiliate class ...
[HasMany(typeof (AffiliateUser), Table="AffiliateUsers", ColumnKey=
"AffiliateID", Inverse = true)]
public IList Users
{
get { return _Users; }
set { _Users = value; }
}
I have in the AffiliateUser class ...
[BelongsTo("AffiliateID")]
public Affiliate Affiliate
{
get { return _Affiliate; }
set
{
if ((null != _Affiliate) && (_Affiliate.Equals(value)))
return;
_Affiliate = value;
}
}
If I change the HasMany to [HasMany(typeof (AffiliateUser))], I get :
{"No persister for: Affiliate"}
If I change the HasMany to [HasMany(typeof (AffiliateUser), ColumnKey=
"AffiliateID")], I get : {"No persister for: Affiliate"}
If I change the HasMany to [HasMany(typeof (AffiliateUser),
Table="AffiliateUsers", ColumnKey= "AffiliateID")], I get
Association references unmapped class: AffiliateUser
Any help would be GREATLY appreciated!!
Thanks :-)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en
-~----------~----~----~----~------~----~------~--~---