Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Problem with not registered in Unit of Work objects

Thx 2 U, Frank, this helpd me much. If someone will be interested,
I made such "patch" in UploadEJB:

    public Upload findById (Long Id) {
        return findById (Id, true);
    }

    public Upload findById (Long Id, boolean lazy) {
        Upload upload = em.find (Upload.class, Id);

        if (upload != null && !lazy)
            upload.setFileData (em.find (Upload.class, Id).getFileData ());

        return upload;
    }

 
________________________________

Best regards, Alexander Makarenko.


      


Back to the top