/** * PUBLIC: * If <em>all</em> the fields in the database row for the aggregate object are NULL, * then, by default, TopLink will place a null in the appropriate source object * (as opposed to an aggregate object filled with nulls). This behavior can be * explicitly set by calling #allowNull(). * To change this behavior, call #dontAllowNull(). Then TopLink * will build a new instance of the aggregate object that is filled with nulls * and place it in the source object. * In either situation, when writing, TopLink will place a NULL in all the * fields in the database row for the aggregate object. */ public void allowNull() { setIsNullAllowed(true); }
/** * PUBLIC: * If <em>all</em> the fields in the database row for the aggregate object are NULL, * then, by default, TopLink will place a null in the appropriate source object * (as opposed to an aggregate object filled with nulls). This behavior can be * explicitly set by calling #allowNull(). * To change this behavior, call #dontAllowNull(). Then TopLink * will build a new instance of the aggregate object that is filled with nulls * and place it in the source object. * In either situation, when writing, TopLink will place a NULL in all the * fields in the database row for the aggregate object. */ public void dontAllowNull() { setIsNullAllowed(false); }
mapping.setIsNullAllowed(true); mapping.setReferenceClassName(getReferenceClassName()); mapping.setAttributeName(getAttributeName());