Hi there,
I am trying to create a database index for a mapping table. My source looks like this:
| @ManyToMany(
| targetEntity=PortalUser.class,
| cascade = { CascadeType.PERSIST, CascadeType.MERGE },
| fetch = FetchType.LAZY
| )
| @JoinTable(
| name="friends",
| joinColumns={@JoinColumn(name="psid")},
| inverseJoinColumns={@JoinColumn(name="ptid")},
| uniqueConstraints={@UniqueConstraint(columnNames={"psid",
"ptid"})}
| )
|
If I try to use the following code i get an error:
| @ManyToMany(
| targetEntity=PortalUser.class,
| cascade = { CascadeType.PERSIST, CascadeType.MERGE },
| fetch = FetchType.LAZY
| )
| @JoinTable(
| name="friends",
| joinColumns={@JoinColumn(name="psid")},
| inverseJoinColumns={@JoinColumn(name="ptid")},
| uniqueConstraints={@UniqueConstraint(columnNames={"psid",
"ptid"})}
| )
| @Index(name = "friendindex", columnNames={"psid",
"ptid"})
|
Does any one has a solution for this?
Thank you very much,
Maciej
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988511#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...