Invalid information in Section 10.2 Making Objects Persistent

Description

There is a discrepancy in Section 10.2 "Making objects persistent" of the hibernate_reference.pdf.

It currently states the following:

Alternatively, you may assign the identifier using an overloaded version of save().
------------------------------------------------------ DomesticCat pk = new DomesticCat();
pk.setColor(Color.TABBY);
pk.setSex('F');
pk.setName("PK");
pk.setKittens( new HashSet() );
pk.addKitten(fritz);
sess.save( pk, new Long(1234) );
------------------------------------------------------
The problem is that there is no overloaded version of Session.save() that takes an Object and a Serializable as arguments.

Environment

Adobe

Activity

Show:
Max Rydahl Andersen
April 21, 2006, 7:42 AM

there is in my version of hibernate on the classic Session interface.

/**

  • Persist the given transient instance, using the given identifier. This operation
    * cascades to associated instances if the association is mapped with
    * <tt>cascade="save-update"</tt>.
    *
    * @deprecated declare identifier properties for all classes
    *
    * @param object a transient instance of a persistent class
    * @param id an unused valid identifier
    * @throws HibernateException
    */
    public void save(Object object, Serializable id) throws HibernateException;

Rejected

Assignee

Unassigned

Reporter

Stephen M. Wick

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure