SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)

    Question 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.

    Thanks.

  2. #2
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not sure I understand what you mean by
    but what if Store didn't exist and all I had was a storeId?
    .NET Code Monkey

  3. #3
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    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.

  4. #4
    SitePoint Wizard big_al's Avatar
    Join Date
    May 2000
    Location
    Victoria, Australia
    Posts
    1,661
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Serenarules View Post
    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.
    Errr now I'm more confused... Wrong thread perhaps?
    .NET Code Monkey

  5. #5
    Resident OCD goofball! bronze trophy Serenarules's Avatar
    Join Date
    Dec 2002
    Posts
    1,911
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    Perhaps. =) I've changed a lot about how I want to implement things since I took a short break. Just let this thread die. =)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •