If you have a less-than-ideal relationship with your boss, it might have something to do with how you were raised. New research published in the journal Human Relations shows how some of us end up grappling with issues from childhood on the job, where a distant, all-business boss can call to mind an unreliable, unnurturing parent. 

Say, for example, you grew up with a mother or father who was depressed and had trouble getting out of bed every day. "That experience carries over into your adulthood," says Peter Harms, PhD, lead author on the study. 

But the research offers some hope as well: With more understanding of the dynamics in play, we may transcend even crappy parents to enjoy low-stress, productive work environments.

The research draws on John Bowlby's attachment theory, a pillar of psychological thinking, which says that how you are treated as a child shapes the way you react to the world as an adult. According to this theory, about 60% of people are emotionally healthy as a result of good parenting.

RELATED: 12 Ways to Make Your Office Better for Your Health

Of the 40% of children who grow up with unreliable parents (meaning their parents don't respond to their needs), half develop an "anxious" attachment style. In studies, when anxious children are left alone, they “escalate crying beyond all belief, and when the parent comes back, the child just keeps going, like they’re punishing the parent,” explains Harms, who is an assistant professor in the department of management at The University of Alabama in Tuscaloosa. The rest of children with unreliable parents develop an "avoidant" attachment style, meaning they don't react at all when the parent leaves, and they ignore them when they return.

Harms and his co-authors suspected that dynamics in the workplace mirror those of our formative years. To find out, they had supervisors and employees at eight Ohio restaurants answer questions about their attachment styles, job stress, and how much they trusted their supervisors.

The conclusions the researchers drew were based on responses from 28 supervisors and 152 employees. They found that employees who'd grown up with good parents weren't affected too much by how their bosses behaved. Neither were those who had avoidant styles; they preferred to just do their jobs and go home. These avoidant types were also less likely to be good team players, says Harms.

RELATED: Are You Too Hard On Yourself? This Study Explains Why 

Employees with the anxious attachment style, though, reported high stress if their supervisors were avoidant. In general, these are people who tend to "complain more in the workplace, or report having more drama," says Harms. 

When anxious people had good bosses (meaning their bosses were good surrogate parents), they weren't so stressed out. "Individuals who were anxious but who had supportive leaders could function at high levels," says Harms. 

The key ingredient was trust. "You have a situation where anxious people want to be reassured, but are nervous that the support they get is shallow or likely to end," says Harms. "A leader who can build a foundation of trust can help them not 'activate' their anxieties in the first place."

The findings could have implications for how we cull leaders or supervisors. "It's important to realize that those cold-hearted leaders might not be the best in all circumstances," says Harms. "We often assume the same style of leadership works for everyone," he says, but that's not the case.

​RELATED: How Your Cube Mate Can Improve Your Concentration

The findings may also help you be a good "follower" or employee, by changing your perception of your distant boss. "You could look at your leader and think, Maybe this person has never had a role model to show them what it means to be a good dad or mom, and the leader is like the dad or mom of the workplace," says Harms. 

Harms hopes the findings could contribute to more humane working conditions. "We can basically show that there really are no broken people," says Harms. "There are fragile people but they're not necessarily broken, and if we give them a supportive environment, they can like their job." 

After all, as he points out, the ultimate goal shouldn't just be increased productivity, "but increased well-being."