Help

Controls

PermLinkWikiLink

Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

Forum: Seam Users Forum ListTopic List
22. May 2008, 18:32 CET | Link

Hi,

I'm using Seam 2.0.2 RC2 and MySQL connector driver 5.0.5.

I'm trying to remove an instance of Center Entity but it fails because this entity is referenced by a foreign key by an other entity Examination.

My CenterHome class extends EntityHome and the remove method does the following :

    @Override
    public String remove() {
        log.debug("remove : Begin");
        attachInstanceToEntityManager();
        
        String outcome = null;

        try {
            outcome = super.remove();
            // End the nested conversation and redirect to the parent page view
            Conversation.instance().redirectToParent();
        }
        catch (final PersistenceException exc) {
            log.error(exc.getMessage());
            isManaged();   ----->Here is the problem : it returns false <------
            FacesMessages.instance().add(Messages.instance().get("errorMessage"}
        return outcome;
    }

As the remove failed, it seems to me that the instance should still be managed. And I can't find a way to merge the instance to the EntityManager.

Any help would be really appreciated.

Thanks,

Adrien