Hi All,
I have two tables " application " and " user ". So Application has
@ManyToMany relation with User. below is the code for
@ManyToMany.
Application.java
protected List<User> users= new ArrayList<User>(0);
@ManyToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
@JoinTable( joinColumns=
@JoinColumn(name="application_fk"),
inverseJoinColumns=
@JoinColumn(name="user_fk"))
@ForeignKey(name="FK_USER_APPLICATION",
inverseName="FK_APPLICATION_USER")
@IndexColumn(name="applicant_order", base=0)
public List<User> getUsers() {
return users;
}
public void setUsers(List<User> users) {
this.users= users;
}
when i drag and drop the " users " property to the query browser ( Birt dataset), i am not able to see the zipCode of the user. I am doing some thing like this.
select users[0].zipCode , count(users[0].zipCode),
sum(amount) , avg(amount) from Application
if i do ctrl + shift after " users[0]. " , i should see all the properties of User. I am not seeing that and if i try to put the property manually its throwing java.lang.NullPointerException.
if i do ctrl + shift after " users. " its again showing the same properties of Application. actually it should show the properties of " users " list i.e java.util.ArrayList.
can some one please help me to solve this issue. has any one come accross such issue.
regards,
ganesh