[JBoss-user] [EJB 3.0] - Re: How to map a relation table.

2006-02-28 Thread cspada
Thanks a lot. I'll have a look to hibernate tool right now. Christophe. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3926732#3926732 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3926732

[JBoss-user] [EJB 3.0] - How to map a relation table.

2006-02-27 Thread cspada
Hi, i have A relation table between 2 object A and B, each has one id idA and idB In an existing model i have a relation table to associate object A and B with some other information (asootiation date, etc...). So the AB table is : idA long idB long createDate Date ... ... It's primary key is a

[JBoss-user] [EJB 3.0] - Why do i have to em.flush() here ?

2006-02-27 Thread cspada
hi in this part of code : ... FleetUser fu = (FleetUser) QueryUtils.getNamedQuerySingleResult(em, FleetUser.findFleetUserForFleet.indexed, fleet); em.remove(fu); em.flush(); // HAVE TO FLUSH HERE FleetUser newFu = new FleetUser(fleet, user); fleet.setIsManaged(true); em.persist(newFu);

[JBoss-user] [EJB 3.0] - Re: @OneToMany relation issues

2006-02-23 Thread cspada
No one to help on this ? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3925780#3925780 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3925780 --- This SF.Net email is

[JBoss-user] [EJB 3.0] - Re: @OneToMany relation issues

2006-02-23 Thread cspada
wereldkeuken wrote : I don't see the reason why you use @JoinTable for a onetomany relationship? This is meant for a manytomany relationship no? Yes it is. But i am actually coding my EJB3 code for an application, but i have to use the old Datamodel in place. So i have no choice for the moment.

[JBoss-user] [EJB 3.0] - Using a @JoinTable with a @ManyToOne relation.

2006-02-22 Thread cspada
Hi. I have the following exception when using a @JoinTable with a @ManyToOne relation : org.hibernate.cfg.NotYetImplementedException: association table on a single ended association is not yet supported I know that a many-to-one relation doesn't need a join table to be done, but we had to

[JBoss-user] [EJB 3.0] - Re: association table on a single ended association is not y

2006-02-22 Thread cspada
epbernard wrote : that you cannot yet map a many to one association using an association (join) table Sorry i've just post a similar question. But is it definitive or will it be possible in the future ? is it part of the EJB3 specs or a limitation of hibernate ? Thanks. View the original post

[JBoss-user] [EJB 3.0] - Re: Using a @JoinTable with a @ManyToOne relation.

2006-02-22 Thread cspada
PS: i was able to map ManyToOne relation with an external table in EJB2.1. EJB3 does not permit that anymore ? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3925571#3925571 Reply to the post :

[JBoss-user] [EJB 3.0] - @OneToMany relation issues

2006-02-22 Thread cspada
Hi, me again. A have some issues with an unidirectional @OneToMany relation Here are the code and results : Entity bean @Entity @Table(name = MANAGER) public class Manager implements Serializable { protected Collection managedFleets;

[JBoss-user] [EJB 3.0] - Re: Load entity lazy fields...

2006-02-14 Thread cspada
Thanks, but i couldn't find anything about the @Fetch annotation and how to use it. It doesn't seem to be part of the ejb specs. Is it a specific Hibernate tag ? Could you give me a link or a piece of example ? Thank you. Christophe. View the original post :

[JBoss-user] [EJB 3.0] - Re: What happened to javax.ejb.InvocationContext.getEJBConte

2006-02-13 Thread cspada
I didn't find it anymore too. But i still can obtain a reference to the Session context with : public class MyInterceptor { @Resource protected SessionContext sessionCtx; . @AroundInvoke public Object aroundInvoke(InvocationContext invCtx) throws

[JBoss-user] [EJB 3.0] - Pass object from an Interceptor to a Session bean.

2006-02-13 Thread cspada
Hi. Is it possible to instanciate some object in an interceptor and passing it to the current session bean method ? I tried to use the InvocationContext with the InvocationContext.getContextData().put(MyKey, MyValue). But actually i can only use this InvocationContext in others interceptors. Is

[JBoss-user] [EJB 3.0] - Re: Pass object from an Interceptor to a Session bean.

2006-02-13 Thread cspada
Thanks, it works fine with this trick ! But is it the only way to do that ? If a chain of interceptor are sharing and adding some information to the contextData of an InvocationContext, each of them (or the last one) should store the contextData in a ThreadLocal for the session bean ? In this

[JBoss-user] [EJB 3.0] - Load entity lazy fields...

2006-02-13 Thread cspada
Hi, i'm using some entities with a lot of relations and tagged them with the LAZY FetchType. So i decided to use masks to load the needed relations from a session bean. See below : public Account loadRelations(int mask) { Logger logger = Logger.getLogger(this.getClass());

[JBoss-user] [EJB 3.0] - Re: Have a few bean naming problems with ejb3 rc5

2006-02-10 Thread cspada
[EMAIL PROTECTED] wrote : look at the tutorial eamples. EJBNAME/remote Seems that with the new jboss4.0.4RC1 the lookup need to be EAR File name withour .ear extension/BEAN NAME/remote Why do all the binding start with the EAR name ?? View the original post :