Embedded Objects get set to null if all its members are null

Description

Embedded Objects get set to null if all its members are null.i am facing this problem when i am having @Embeddable properties are null.even i creating instance in Parent class no-argument constructor.is there any other way to overcome from this issue?

Thanks

Activity

Show:

Brett MeyerJanuary 23, 2013 at 1:33 AM

As suggested, focusing on and duplicating the rest.

Pavel HoralJanuary 15, 2013 at 11:15 AM

We need to make a single report for this so that people can vote on it. Here is a summary of related issues I found:

  • - suggestion to add nullable to @Embedded

  • - pretty much the first issue on this topic, closed by Gavin (3 votes, 10 watches)

  • https://issues.jboss.org/browse/HIBERNATE-50 - great discussion, wrong JIRA (12 votes, 13 watches)

  • - suggestion for a new annotation (3 votes, 5 watches)

  • - bug report on the behavior (8 votes, 10 watches)

  • - improvement request (5 votes, 4 watches)

We should focus on just one (either or HHH-7610) and vote it up. The rest can be probably closed as duplicates.

Tobias RoeserJune 2, 2010 at 4:34 PM

Maybe adding a boolean parameter 'nullable' to @Embedded which defaults to false could be an easy solution?

Duplicate

Details

Assignee

Reporter

Components

Priority

Created February 2, 2010 at 11:21 AM
Updated April 22, 2015 at 6:24 PM
Resolved January 23, 2013 at 1:34 AM