Before I leave, I have a question

These is something I never quite “got”, and would like some resolution to. I highly suspect it’s one of the root causes of some of my confusion when it came to making my domain work. So if it’s not too much trouble, try and help me understand them so when I come back to my project later, I’ll be on a better footing.

My ManyToMany relationships.

How do you code up, and map, a many to many relationship when one side of the relationship has no related entity?

For example: if I had the entities Store and Product, I could give each a list of the other and mark them HasManyToMany using Table(“StoreProduct”), but what if Store didn’t exist and all I had was a storeId?

Would I be forced to write a StoreProduct entity?

StoreProduct { int StoreId, ilist<Product> Products }

Would the Products list in such an entity be ManyToMany or just Many?

Ok, well…think about that, and see if you can come up with an answer for me. I’ll check back tonight or tomorrow.


Errr now I’m more confused… Wrong thread perhaps?

I’m using ASPNETDB for user, role, and profile stuff. It is a separate db (I don’t want to use the tool that sets things up in a target db). Therefore, entities in the domain that need to reference the user only have the guid of that user, not an actual object.

Not sure I understand what you mean by

but what if Store didn’t exist and all I had was a storeId?

Perhaps. =) I’ve changed a lot about how I want to implement things since I took a short break. Just let this thread die. =)