[jboss-user] [Beginner's Corner] - ManyToMany problem

2009-10-29 Thread swenu
Hi all playing around with Seam and trying to fill a manytomany join table. Following situation: A person has multiple roles (based on work, not as a role known from the security). A role could have 0..n functions (specialised education). so i tried the follwing: Role and Funtion joined on rol

[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

2009-10-30 Thread swenu
Hi Wolfgang Thanks for your input. So far i got it already. The role_function is generated automaticly But now i got role_id | function_id What should i do if like a generated id within this table? Thanks a lot View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p

[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

2009-10-31 Thread swenu
Hi Wolfgang Thanks for your input. I need the generated id to reference to this pair (role - function). I tried to do it as it is described here: http://en.wikibooks.org/wiki/Java_Persistence/ManyToMany#Additional_columns_in_join_table. for the moment it doesn't work. I'll keep going on this way

[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

2009-10-31 Thread swenu
Sorry :) I just stuck here and have no idea what the problem is. Hope someone got input for me! Here my classes: package ch.emtm.entity; | | import java.io.Serializable; | import java.util.List; | | import javax.persistence.Entity; | import javax.persistence.GeneratedValue; | imp

[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

2009-10-31 Thread swenu
one step closer :D i got the problem - at least i think i'm close to! on roleList.xhtml i got: | | Function | | | | and when i save i receive the following error: 23:33:05,776 SEVERE [application] java.lang.ClassCastException: ch.e

[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

2009-11-03 Thread swenu
Hi again :D i found a solution - at least i'm close to a solution. I added this function to the Role. | @OneToMany(mappedBy="role") | private List listRoleFunctions; | ... | public List getFunctions(){ | List functions = new ArrayList(); | if(this.listRoleFunc

[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

2009-11-03 Thread swenu
Booah thanks for the fast answer :D New to all the things here - i'm so sorry! Next question i got! After i remover the roleFunction from the listRoleFunctions (i've checked, it's okay) and save the removed item is still available in the database! Bad news: there's no stack trace neither in cons

[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

2009-11-03 Thread swenu
Hi Wolfgang close to Germany from [ + ] ;) thanks i will have a look at it again - hope to get it work now. Will return if i get questions or if it's done. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263792#4263792 Reply to the post : http://www.jboss.o

[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

2009-11-03 Thread swenu
Sorry back again *grml* I don't get it - cause i'm doing the assignment in the entity not in the bean. Imho there's a difference to the text you've wrote. I tried to remove the refernces within the remove loop from both sides. No effect =( View the original post : http://www.jboss.org/index.h

[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

2009-11-04 Thread swenu
Yesterday i moved the code from the entity to the RoleHome. Now looks like this in RoleHome.java package ch.emtm.session; | | import java.util.ArrayList; | import java.util.List; | | import javax.persistence.EntityManager; | | import org.jboss.seam.annotations.Begin; | import org

[jboss-user] [Beginner's Corner] - Re: ManyToMany problem

2009-11-08 Thread swenu
hi Wolfgang as you wrote in your first post - reading the link will help! Now it works! Thanks for your tirelessly help! Best regards, Sven View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264438#4264438 Reply to the post : http://www.jboss.org/index.html?mod

[jboss-user] [Beginner's Corner] - OneToOne could be null

2009-11-11 Thread swenu
Hi i have a question about a OneToOne within an entity. What i want is that this assignment is optional. I solved it like this: @OneToOne(optional = true) | @JoinColumn(name = "company", nullable=true) It doesn't work when i want to save a null assignment! 15:23:32,541 INFO [S

[jboss-user] [Beginner's Corner] - Re: OneToOne could be null

2009-11-12 Thread swenu
Hi Wolfgang This is a suggestion box. The user could not change anything of the company. Only selection. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4265396#4265396 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4265

[jboss-user] [Beginner's Corner] - Re: OneToOne could be null

2009-11-20 Thread swenu
Hi Wolfgang Sorry long time ago i've posted! I have a person which i can edit and this person could be assigend to a compnay. But this assignment is optional! Here's the code for the selection | Firma |

[jboss-user] [JBoss Tools Users] - Sharing Seam projects with SVN

2009-10-06 Thread swenu
I'm not sure, if it's the right place - if not, please move to the right one! I created a Seam web project with the jboss tools wizard. Now i want to share it with some other developers. Which files i have to ignore before i commit? Thanks in advance,swenu View the original po

[jboss-user] [JBoss Tools Users] - Re: Sharing Seam projects with SVN

2009-10-07 Thread swenu
thanks for all your answers! I don't know the differences what i've done yesterday and today. Now it seems to work! Thanks all! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4259053#4259053 Reply to the post : http://www.jboss.org/index.html?module=bb&op=p

[jboss-user] [JBoss Tools Users] - Re: Sharing Seam projects with SVN

2009-10-09 Thread swenu
hi back again on the problem! today the mate checked out the project and started the jboss from eclipse. While deploying the ear we get this error: DEPLOYMENTS MISSING DEPENDENCIES: | Deployment "persistence.unit:unitName=emtm-ear.ear/emtm-ejb.jar#emtm" is missing the following dependencies