-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Please, the tag join works in Hibernate 3.0?
PostPosted: Tue Nov 08, 2005 2:52 pm 
Newbie

Joined: Fri Nov 04, 2005 12:51 pm
Posts: 5
Hi! I was looking after a solution to a problem that i'm having. I've been looking for into these pages:

http://forum.hibernate.org/viewtopic.php?t=937111
http://opensource2.atlassian.com/projec ... se/HHH-551

http://forum.hibernate.org/viewtopic.ph ... join+table


They all tell me that the tag join ins't implemented.

Is that correct?


Thanks in advance.


This is how i'm using the join tag:


<join table="TBSMS_TIPO_ARQ" column="id_tipo_arq">
<key column="id_tipo_arq" />
<property name="tipoLayout" column="ds_desc" />
</join>


And this is the error:

br.com.netservicos.jnet.exception.JNetException: java.rmi.RemoteException: EJB Exception: ; nested exception is:
Initialization of bean failed; nested exception is org.hibernate.MappingException: invalid mapping
at br.com.netservicos.jnet.delegate.GenericBusinessDelegate.executeMethod(GenericBusinessDelegate.java:155)
at br.com.netservicos.jnet.delegate.GenericBusinessDelegate.execute(GenericBusinessDelegate.java:95)
at br.com.netservicos.jnet.base.BaseAction.executeDelegate(BaseAction.java:62)
at br.com.netservicos.sms.fatcobranca.webapp.action.ControlaLogArquivosAction.selecionaListaLogArquivos(ControlaLogArquivosAction.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at br.com.netservicos.jnet.base.BaseAction.execute(BaseAction.java:126)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1006)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6718)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3764)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)


Top
 Profile  
 
 Post subject: It works
PostPosted: Tue Nov 08, 2005 4:33 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
The join mapping works fine for me. Have you got the trace of the parse exception, or is that being hidden by your app?

Something to look out for: in the DTD, join is specified as coming after the maps, properties, etc., not mixed in with them. I find that a little odd, but there you go. Make sure that your join definitions are inside your class element but after the rest of your data elements.

Note that join isn't particularly recommended, and should really only be considered when you are writing new hibernate code to deal with an existing schema. If you're creating your tables at the same time as writing your app, you should aim for one table per class, most of the time. The join tag is there mostly to support multiple tables for a class.[/i]


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 09, 2005 6:56 am 
Newbie

Joined: Fri Nov 04, 2005 12:51 pm
Posts: 5
Hi! Thanks for your reply.

Why join isn't recommended? Is there a place where i can read about it?

Thanks

Marcelo.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.