I am almost new to DDD, i have read books and watch pluralsight video from Steve Smith and Julie Lerman. I am quite confident that i understood the concepts except couple of things that stucked in my mind.
First of all i am confused with how should i think about Entity concept. I understand that Aggregate Root is a single unit it includes all the business rules. And it should go to database as single unit. Also i am okay with Aggregate Root can have a collection of some entities. Like a classical example Order --> LineItems. Order is Aggregate Root LineItems are Entity .LineItem is defined by a unique identifier and it has its own business rules. So far so good.
So here are the things that i understand
Aggregate Root --> Single unit
Entity --> Mutable belongs to aggregate root and identified by id
Value Object --> Immutable belongs to entity or aggregate root and identified by properties
What i want to ask over here is, in DDD, is there any example that Aggregate Root can contain one to one relationship with an entity. I have checked couple of examples all i find is collections.
Correct me if I am wrong but I think this is impossible from the definitions since entity can not be exposed to outside of aggregate root. Since it can not be exposed, unique id for one to one relationship doesn't make sense inside the aggregate root. It seems like all of one to one relations with aggregate root of entities becomes value object or another aggregate root depending on the bounded context and what you are interested to do inside the context.
Is this right way of thinking or do i miss some parts?
Let's assume that I have a Customer object belongs to my Order aggregate root. According to my bounded context it could be either value object or most likely another aggregate root but never could be an entity?
EDITED
Thank you for the answers. I think i am confused among terms "Aggregate Root", "Aggregate", "Entity" now it is more clear from what i have read thanks to @VoiceOfUnreason and @ssmith.
Here is two different design that i have made for my purpose. This is very small representation of my bounded context but it could give an idea.
I didn't write down my business rules over here. But to summarize,
This Bounded Context (Campaign Management) is responsible to manage displays,videos and images and schedule them in different dates and times with some rules like aspect ratio, extensions, mime types and so on for the campaign. I didn't show the other aggregates over here to simplify the diagram.
My problem is with Client and Advertiser in this diagram. In this context, I do not have any business rules that is related with Advertiser or Client. Only thing that I would need is gonna be email address of the client to send some reminders. Otherwise Client and Advertiser is just a lookup for the campaign. Campaign is gonna be pushed from an external system to this bounded context with an event bus or http call. So the client doesn't mean much in this context. Or another way of saying, there is no behavior that is connected to those objects or at least from what I see until now :)
So according to this information, I was thinking to create Advertiser and Client as entity at first but since unique id of them is not gonna be useful, then I have come up with the question that I have asked here. And you can see two different designs that i have made one with value object and other with aggregate root. If i would go with aggregate root, then probably I will move Client and Advertiser to another bounded context. And use that context just for lookup. And if things change in the future, this generic context will evolve. That's what I am leaning onto right now, don't know if it is the right way though.