When XH left, my kids were very needy. They were older, 8-12. They would wake up, use the bathroom and want to sleep with me. Some nights I had all 4 of them (and the dog) in my bed. It was rough. It lasted a year for all but one. She had extenuating circumstances, it took her another year.
That being said, I live with my daughter and (almost 2yo ) granddaughter. DGD has terrible sleep issues, we are working on them-but most nights she spends part of the night with either dd or myself. I figure she'll out grow it.
Edited to ad:
Last month we moved her from her crib to a big girl bed (twin size). The reason we did it early, she is a very active sleeper (think whirlybird) and we figured the crib was confining her too much. We do know she sleeps very well in a queen size bed where she can move around without being impeded. She gets about 6 hours straight before waking up and walking across the hall to me or thru the house to DD. Those 6 hours were a HUGE step for her.
Is it possible your DD has a similar issue?
I always moved my kids when they were 2yo out of the crib. My last kid was a whirlybird sleeper, she made life miserable for XH and I, our bed was the only one she would sleep in. Our Pediatrician suggested moving her into a bed way early..(16 months) and she slept soundly after that. So did X and I, well after the first night watching her sleep!
Good luck, and consistancy is the key. To keep DGD in her room until she falls asleep we use a gate. When we go to bed, the gate comes down. She quietly gets up, out of bed and climbs into mine. Some nights I don't know she is there till I wake up. It's why we're not worried so much about it at the moment.
I hope this helped.