3.6 Finding Objects by Primary Key
TopLink provides a predefined finder (findByPrimaryKey
) that takes a primary key as an Object
. This finder is defined at runtime – not in the Mapping editor
Example 3-6 Executing a Primary Key Finder
{
Employee employee = getEmployeeHome().findByPrimaryKey(primraryKey);
}