Hi Rodrigo,

@ManyToMany with jointable helps me.

But i got next problem when i try modify user Application list:

//transaction begin
 User user  = em.find(User.class, userId);
 Collection apps = user.getApplications();
//Application app = em.find(Application.class, appId);
// next code throw java.lang.StackOverflowError. Why?
//apps.remove(app);

 Collection newApps = new ArrayList();
        for (Iterator iterator = apps.iterator(); iterator.hasNext();) {
            Application o = (Application) iterator.next();
            if (o.getAppId().intValue()!=appId){
                newApps.add(o);
            }
  }
        user.getApplications().clear();
        user.getApplications().addAll(newApps);
        em.merge(user);
// transaction end

resin don't execute SQL with table update.

2007/10/3, Rodrigo Westrupp <[EMAIL PROTECTED]>:
>
>
> --- Sergey Plehov <[EMAIL PROTECTED]> wrote:
> >
> > When i try execute user.getAccs() i get SQLException ORA-00936: Missing
> > Expression.
> >
>
>   Hi Sergey,
>
>   I have filed a new bug report:
>
>   http://bugs.caucho.com/view.php?id=2037
>
>   The issue seems to be the many-to-one using one of the compound pk
> columns as
> the foreign key. As a workaround, it looks possible to use a @ManyToMany
> where
> APP_ACCESS would be the map table.
>
>   Regards,
>
>   -- Rodrigo
>
>
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>



-- 
-------------------------------
Sergey Plehov
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to