title: Hibernate returning null for @OneToOne
body: <p>I defined this relationship in my <code>User</code> class:</p>
  
  <pre><code>@OneToOne (cascade = CascadeType.ALL, fetch = FetchType.EAGER)
      @JoinColumn (name = "id")
      private Balance balance;
  </code></pre>
  
  <p>Hibernate creates necessary tables with the right relationships.</p>
  
  <p>However, when I retrieve <code>User</code> objects using the following code, <code>Balance</code> is set <code>null</code>.</p>
  
  <pre><code>User fetchedUser = userRepository.findOne(id);        
  Balance balance = fetchedUser.getBalance();
  </code></pre>
  
  <p>Why is this?</p>
  
  <p>(I use Spring Data for data access.)</p>
  
  <p>Edit:</p>
  
  <p>This code generates the <code>users</code> table:</p>
  
  <pre><code>CREATE TABLE `users` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
      `contact_number` VARCHAR(255) NOT NULL,
      `date_created` DATE NOT NULL,
      `date_of_birth` DATE NOT NULL,
      `device_id` VARCHAR(255) NOT NULL,
      `email` VARCHAR(255) NULL DEFAULT NULL,
      `gender` TINYINT(1) NOT NULL,
      `location` VARCHAR(255) NOT NULL,
      `name` VARCHAR(255) NOT NULL,
      `password` VARCHAR(255) NOT NULL,
      `username` VARCHAR(255) NOT NULL,
      `balance_id` BIGINT(20) NULL DEFAULT NULL,
      PRIMARY KEY (`id`),
      INDEX `FK6A68E08CBE6702` (`balance_id`),
      CONSTRAINT `FK6A68E08CBE6702` FOREIGN KEY (`balance_id`) REFERENCES `balances` (`id`)
  )
  </code></pre>
  
  <p>And this generates <code>balances</code></p>
  
  <pre><code>CREATE TABLE `balances` (
      `id` BIGINT(20) NOT NULL AUTO_INCREMENT,
      `total_claimed` INT(11) NOT NULL,
      `total_won` INT(11) NOT NULL,
      PRIMARY KEY (`id`)
  )
  </code></pre>