remove objects without foriegn keys in jpa controller
===

here is my code,

**SiteMember class**

    @OneToMany(mappedBy = "member",cascade=CascadeType.ALL)
        private List<MemberThread> memberThread = new ArrayList<MemberThread>

and 

**MemberThread class**

    @ManyToOne(cascade=CascadeType.ALL)
        @JoinColumn(nullable=false)
        private SiteMember member;


**MemberThreadJpaController class**

 

    public void destroy(Long id) throws IllegalOrphanException, NonexistentEntityException, NotSupportedException, RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
            EntityManager em = null;
            try {
                em = getEntityManager();
                ut.begin();
                MemberThread memberThread;
                try {
                    memberThread = em.getReference(MemberThread.class, id);
                    memberThread.getId();
                } catch (EntityNotFoundException enfe) {
                    throw new NonexistentEntityException("The memberThread with id " + id + " no longer exists.", enfe);
                }
                List<String> illegalOrphanMessages = null;
                List<Reply> replysOrphanCheck = memberThread.getReplys();
                for (Reply replysOrphanCheckReply : replysOrphanCheck) {
                    if (illegalOrphanMessages == null) {
                        illegalOrphanMessages = new ArrayList<String>();
                    }
                    illegalOrphanMessages.add("This MemberThread (" + memberThread + ") cannot be destroyed since the Reply " + replysOrphanCheckReply + " in its replys field has a non-nullable memberThread field.");
                }
                if (illegalOrphanMessages != null) {
                    throw new IllegalOrphanException(illegalOrphanMessages);
                }
                SiteMember member = memberThread.getMember();
                if (member != null) {
                    member.getMemberThread().remove(memberThread);
                    member = em.merge(member);
                }
                em.remove(memberThread);
                ut.commit();
            } finally {
                if (em != null) {
                    em.close();
                }
            }
        }
    

    

this will remove both SiteMember and MemberThread objects because MemberThread has a foreign key of SiteMember.how can i remove only MemberThread?

thanks..
   
