> public class Post : BaseEntity<Post>
> {
> [Property("BlogId", NotNull = true)]
> public Guid BlogId
> {
> get { return blogId; }
> set { blogId = value; }
> }
[BelongsTo("BlogId")]
public Blog Blog {get; set;}
> }
>> > anyway...it is not the ID on Post that is the problem.. it is the
>> > BlogID on Post that is empty after I persist Blog with Blog.Save().
Of course, it is changed in the DB but not in the object. Call
post.Refresh() to reload it. If you implement it as I have written
above, you could also set Blog on the post instance instead.
public void AddPost(Post post)
{
posts.Add(post);
post.Blog=this;
}
-Markus
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---