As to changing List to SortedSet on JBoss 4.0.4. GA, I found that the dvdstore
example in seam 1.0.1 GA used the List:
@Entity
| @Table(name="ORDERS")
| public class Order
| implements Serializable
| {
| ...
| List orderLines = new ArrayList();
| ...
| @OneToMany(mappedBy="
Thanks John and to everyone who have posted their solutions here. It worked, so
it is important to implement Comparable (NOT comparator) on your Entities, if
you are planning to use SortedSet as I have done.
Thx
Vijay
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewto
Try implementing Comparable instead of Comparator. TreeMap.compare(), I
believe, invokes the class's compareTo() method, after casting to Comparable. I
think that's where you're exception is.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3953132#3953132
R
I have used the SortedSet instead of List and the OneToMany relation works when
I write or update but when I retrieve my composite object it gives a
ClassCastException on the TreeSet Compare. I do not know why as I have my
object as a comparator and it implements a compare method??
publ
I have a problem after changing List to Set. Since the data type of JSF
dataTable should be List, Array or ResultSet, it is a little hard to change Set
back to List to be displayed by dataTable, especially for Seam @DataModel.
Anybody has some good idea? Thank you.
View the original post :
htt
I think the answer is the same for all of us -- don't use List, unless you have
a really good reason. Use SortedSet.
Then you can use @Sort(type=SortType.NATURAL) if you have Comparable
implemented, make your own Comparator, or leave it unsorted. I'm assuming that
like me, you only used List b
I still got the same error after adding @IndexColumn(name="id") under
@OneToMany(...).
Do I need to do the same for @ManyToOne and @ManyToMany?
Thanks!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3951831#3951831
Reply to the post :
http://www.jboss.com/i
I'm getting the same error on deployment, but it appears to be in my EJBQL
Named Queries. Is there any way to isolate specifically which named queries
have the problem? Any log messages I can look for? It will take considerable
effort to dig through all of them. I use JOIN FETCH and LEFT OUTER J
Whenever I used @IndexColumn, the first value of the Persistent list is always
null. refer to my "is this a bug?" post.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3948943#3948943
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mod
@IndexColumn never existed in Java EE API. It is a hibernate annotations thing.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3947137#3947137
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3947137
I don't find @IndexColum in Java EE API.
I need to fetch eager and use List for @OneToMany.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3947135#3947135
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3947135
-
Thank you for the tip, I used the @IndexColumn.
Because I needed a list and I already had a JBoss
depency(CascadeType.DELETE_ORPHAN)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3946006#3946006
Reply to the post :
http://www.jboss.com/index.html?module=bb&
Use either:
Set
List with an explicit @IndexColumn
rather than a bag semantic collection like Collection.
I usually make sense for 99% of the domain models
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3945750#3945750
Reply to the post :
http://www.jboss.co
Could you please explain what the best solution is for this problem. I don't
want to lazyload all my oneToMany relationships
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3945374#3945374
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=postin
This is not a bug.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3944696#3944696
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3944696
---
Using Tomcat but need to d
Yes, thanks a lot!
As you said, the new Hibernate version seems to have a bug with OneToMany
relations when they are fetched eager.
OneToOne, ManyToOne and ManyToMany relations still work fine with eager fetch
type. Every single OneToMany relation, which is declared with fetch type eager
crash
that changed line should read
@OneToMany(mappedBy="order",cascade=CascadeType.ALL)
with the @.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3944005#3944005
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3944005
I got the same error deploying to 4.0.4.GA. In my case I had an entity bean
with 2 fields annotated with
@OneToMany(mappedBy="order",cascade=CascadeType.ALL, fetch=FetchType.EAGER)
so I changed them both to read
OneToMany(mappedBy="order",cascade=CascadeType.ALL)
and now the .ear file deploys wi
18 matches
Mail list logo