Spring Hibernate JPA one-to-one relation doesn't return the updated record
===

I am using Spring, Hibernate/JPA, and Mysql. In mysql db, I have two entities, Business and User, are set to be one-to-one relation. Each time I query db and get User, by calling User.getBusiness(). I get Business. However, if after getting user from db, I update Business. Mysql db reflects the update. However, in my code, I couldn't get the updated version. It must be something silly I did. Please help me spot the mistake. 

Here's the code:

    @Entity
    @Table(name = "Business")
    public class Business implements java.io.Serializable {
        @GenericGenerator(name = "generator", strategy = "foreign", 
	parameters = @Parameter(name = "property", value = "user"))
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "bId", unique = true, nullable = false)
	public long getbId() {
		return this.bId;
	}
	
	public void setbId(long bId) {
		this.bId = bId;
	}
		
	@Column(name = "bBizName", nullable = false, length = 256)
	public String getbBizName() {
		return this.bBizName;
	}
	
	public void setbBizName(String bBizName) {
		this.bBizName = bBizName;
	}

	@OneToOne(fetch = FetchType.LAZY)
	@Cascade({CascadeType.SAVE_UPDATE})
	@PrimaryKeyJoinColumn
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
    }



    @Entity
    @Table(name = "User")
    @public class User implements java.io.Serializable {
    	@Id
    	@GeneratedValue(strategy=GenerationType.IDENTITY)
    	@Column(name = "uId", unique = true, nullable = false)
	public long getuId() {
		return this.uId;
	}
	
	public void setuId(long uId) {
		this.uId = uId;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "user", cascade = CascadeType.ALL)
	public Business getBusiness() {
		return business;
	}

	public void setBusiness(Business business) {
		this.business = business;
	}
    }

Here's the DAO file
    @Repository
    public class UserDao {
        private EntityManager entityManager;   

        @PersistenceContext(unitName="sample", type=PersistenceContextType.EXTENDED)
        public void setEntityManager(EntityManager entityManager) {
            this.entityManager = entityManager;
        }
    
        @Transactional(readOnly = false, propagation = Propagation.REQUIRES_NEW)
        public void save(User user) {
    	this.entityManager.persist(user);
        }

        @Transactional(readOnly = false)
        public User updateUser(User user){
    	return this.entityManager.merge(user);
        }
	@Transactional(readOnly = false)
	public void deleteUser(User user) {
		this.entityManager.merge(user); // set the flag to be deleted
	}

	@Transactional(readOnly = true)
	public User getByUId(long uId) {
		return (User) this.entityManager.createQuery("select u from User u where u.uId = :uId").setParameter("uId", uId).getSingleResult();
	}

    }

    @Repository
    @Transactional(readOnly = false)
    public class BusinessDao{
	private EntityManager entityManager;   

	@PersistenceContext(unitName="sample", type=PersistenceContextType.EXTENDED)
        public void setEntityManager(EntityManager entityManager) {
        this.entityManager = entityManager;
        }

	@Transactional(readOnly = false)
	public void save(Business business){
    	this.entityManager.persist(business);	
	}

	
	@Transactional(readOnly = true)
	public Business getByBId(long bId) {
		return (Business) this.entityManager.createQuery("select b from Business b where b.bId = :bId").setParameter("bId", bId).getSingleResult();
	}
	
	@Transactional(readOnly = false)
	public Business updateBusiness(Business business){
    	return this.entityManager.merge(business);

	}
    }

This is when I use it:

    // Get user from db
    User user = this.bizAccountBliImpl.getUserByUserId(uId);
    Business biz = user.getBusiness();

... somewhere I update biz

    this.BusinessDao.updateBusiness(biz);

This line actually updated the table. 

... another place I do this:

    User user = this.bizAccountBliImpl.getUserByUserId(uId);
    Business biz = user.getBusiness();

The biz here still shows the before-update record. Anybody knows why? This has been puzzled me for almost a week. Basically I had to fix this by getting Business directly from db by calling 

    BusinessDAO.getByBId()

That means the hibernate one-to-one relationship is useless in this case. However, when create the Business, that relationship works fine. 

This line:

    bizUser.setBusiness(biz);
    biz.setUser(bizUser);    
    this.userDao.save(bizUser);

actually inseart both User and Business. 