[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: JPA ManyToMany problem

2009-08-06 Thread dgeraskov
The link is not working. The PersistentSet is located into hibernate3.jar. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4248448#4248448 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4248448

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Io exception: Connection reset

2009-07-29 Thread dgeraskov
I guess you guys use hibernate's own connection pooling, but it is rather simple and intended to help you to get started fast. It shouldn't be used in production systems or for testing. Use a third party pool for best performance and stability. For example c3p0, dbcp ... see http://docs.jboss.o

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: %%%% Error Creating SessionFactory %%%%

2009-05-27 Thread dgeraskov
Oracle support siquence. Use it for generating unique id. Why you want to use String as id? Or you don't want to change generated files? It is better to chenage id-type to something better, for example int/Integer. How to use generators see in hibernate documentation, for example here: http://d

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: %%%% Error Creating SessionFactory %%%%

2009-05-27 Thread dgeraskov
Hm... I created java files with all field types String, and getters/setters for them and SessionFactory is built. I only use other dialect, but I think it doesn't matter. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233632#4233632 Reply to the post : http

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: %%%% Error Creating SessionFactory %%%%

2009-05-27 Thread dgeraskov
Give me Suggestion.hbm.xml. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233592#4233592 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233592 ___ jboss-user mailing list jbo

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: %%%% Error Creating SessionFactory %%%%

2009-05-27 Thread dgeraskov
Exception is: org.xml.sax.SAXParseException: Attribute "generated" must be declared for element type "property". Seems like you are using wrong context for element. Give the mapping code with parent of element. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: JPQL - Query Parameter

2009-05-15 Thread dgeraskov
Try this one: em.createQuery("from ObjectA o where o in(select b.ObjectA from ObjectB b where b in(:param))").setParameter("param", param).getResultList(); View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231207#4231207 Reply to the post : http://www.jboss.o

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: JPQL - Query Parameter

2009-05-14 Thread dgeraskov
Check also if it possible for :param with List of ObjectB elements from ObjectA a, ObjectB b where :param member of a.list View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231092#4231092 Reply to the post : http://www.jboss.org/index.html?module=bb&op=postin

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: JPQL - Query Parameter

2009-05-14 Thread dgeraskov
May be something like this: "from ObjectA o where o.id in (select distinct b.fk_objectA from ObjectB.fk_objectA b where b.id in :param)" View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231088#4231088 Reply to the post : http://www.jboss.org/index.html?module=

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: JPQL - Query Parameter

2009-05-14 Thread dgeraskov
Ah, I understood question incorrectly. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231083#4231083 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231083 ___ jboss-user mai

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: JPQL - Query Parameter

2009-05-14 Thread dgeraskov
Try to play with Count() aggregate function. For example "from ObjectA o where COUNT(o.list) >=:param" View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231081#4231081 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231081

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Column Order in EJB3 / Hibernate auto generated tables

2009-05-13 Thread dgeraskov
Use following code to create index with your's columns: @Entity | @Table(name="USERS") | @org.hibernate.annotations.Table( | appliesTo = "USERS", indexes = | @org.hibernate.annotations.Index( | name = "MY_INDEX", |

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: no persistent classes found for query class

2009-05-06 Thread dgeraskov
I created the simplest jpa project. With only 1 entity. package model; import javax.persistence.*; | | @Entity | public class Article implements java.io.Serializable { | | @Id | @GeneratedValue(strategy = GenerationType.AUTO) | private Short id

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Bitwise AND in EJB-QL

2009-01-26 Thread dgeraskov
oracle have bitand(first, second) function. Se how to create function in oracle toplink here^ http://www.oracle.com/technology/products/ias/toplink/doc/1013/MAIN/_html/expres008.htm View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204685#4204685 Reply to the p

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Bitwise AND in EJB-QL

2009-01-23 Thread dgeraskov
Also you can create your own stored procedure and use it. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204251#4204251 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4204251 _

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Bitwise AND in EJB-QL

2009-01-23 Thread dgeraskov
Try to create SQLFunction and add it to your dialect. See here. http://forum.hibernate.org/viewtopic.php?t=940978&highlight=bitwise View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4204249#4204249 Reply to the post : http://www.jboss.com/index.html?module=bb&

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: setParameter() IllegalArgumentException

2008-12-01 Thread dgeraskov
Please, first of all check this cases(most of all 3 and 4, may be you need to use int instead of long): A problem occurred accessing a property of an instance of a persistent class by reflection, or via CGLIB. There are a number of possible underlying causes, including * failure of a secur

[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Problems with JPA/Hibernate persist

2008-11-25 Thread dgeraskov
Seems like your transaction never commited. Try to set for transaction autocommit to true. See documentation how to do this. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192351#4192351 Reply to the post : http://www.jboss.com/index.html?module=bb&op=postin