You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(32) |
Jun
(175) |
Jul
(209) |
Aug
(302) |
Sep
(287) |
Oct
(339) |
Nov
(314) |
Dec
(329) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(479) |
Feb
(389) |
Mar
(599) |
Apr
(307) |
May
(390) |
Jun
(300) |
Jul
(410) |
Aug
(458) |
Sep
(299) |
Oct
(315) |
Nov
(363) |
Dec
(529) |
2005 |
Jan
(568) |
Feb
(434) |
Mar
(1004) |
Apr
(823) |
May
(767) |
Jun
(763) |
Jul
(854) |
Aug
(862) |
Sep
(560) |
Oct
(853) |
Nov
(763) |
Dec
(731) |
2006 |
Jan
(776) |
Feb
(608) |
Mar
(657) |
Apr
(424) |
May
(559) |
Jun
(440) |
Jul
(448) |
Aug
(58) |
Sep
|
Oct
(17) |
Nov
(16) |
Dec
(8) |
2007 |
Jan
(1) |
Feb
(8) |
Mar
(2) |
Apr
(5) |
May
(3) |
Jun
(3) |
Jul
(3) |
Aug
(16) |
Sep
(10) |
Oct
(4) |
Nov
(4) |
Dec
(4) |
2008 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Maarten W. (JIRA) <no...@at...> - 2006-05-31 22:53:16
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1803?page=all ] Maarten Winkels updated HHH-1803: --------------------------------- Attachment: ParentChild.hbm.xml > Allow fetching with criteria when scrolling > ------------------------------------------- > > Key: HHH-1803 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1803 > Project: Hibernate3 > Type: Improvement > Components: query-criteria > Versions: 3.2.0.cr2 > Reporter: Maarten Winkels > Attachments: Child.java, CriteriaScrollFetchTest.java, Parent.java, ParentChild.hbm.xml > > > When querying by criteria, fetching is allowed, but when scrolling a criteria, the fetching corrupts the result. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Maarten W. (JIRA) <no...@at...> - 2006-05-31 22:49:18
|
Allow fetching with criteria when scrolling ------------------------------------------- Key: HHH-1803 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1803 Project: Hibernate3 Type: Improvement Components: query-criteria Versions: 3.2.0.cr2 Reporter: Maarten Winkels When querying by criteria, fetching is allowed, but when scrolling a criteria, the fetching corrupts the result. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Paul K. (JIRA) <no...@at...> - 2006-05-31 21:19:21
|
HQL select for table-per-subclass hierarchy attempts to use superclass column on subclass table with implicit join ------------------------------------------------------------------------------------------------------------------ Key: HHH-1802 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1802 Project: Hibernate3 Type: Bug Components: query-hql Versions: 3.2.0.cr2 Environment: Issue tested on DB2 and HSQL using hibernate-3.2.0.cr2, hibernate-annotations-3.2.0.cr1 and hibernate-entitymanager-3.2.0.cr1 Reporter: Paul Kneeland Attempting to do queries using parts of the superclass in a where clause fails to join in the superclass and instead applies the property to the subclass table and gets sql exception. I boiled it down to a simple test with 4 classes: Animal (abstract superclass with own table) Cat (joined subclass of Animal) Dog (joined subclass of Animal) Family (can contain list of cats and list of dogs) Test (executes some queries) em.createQuery("SELECT animal FROM Animal animal WHERE animal.age > 5"); // works em.createQuery("SELECT cat FROM Cat cat WHERE cat.age > 5"); // works em.createQuery("SELECT dog FROM Dog dog WHERE dog.age > 5"); // works em.createQuery("SELECT family FROM Family family WHERE family.dogs.age > 10"); // Fails applies age column to dog table instead of animal em.createQuery("SELECT family FROM Family family JOIN family.dogs AS dog WHERE dog.age > 10"); // Works My classes are: import org.apache.commons.lang.builder.ToStringBuilder; import javax.persistence.*; /** */ @Entity @Inheritance(strategy = InheritanceType.JOINED) public abstract class Animal { private Integer id; private String name; private Integer age; protected Animal() { } protected Animal(String name, Integer age) { this.name = name; this.age = age; } @Id @GeneratedValue(strategy= GenerationType.IDENTITY) public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } public String toString() { return ToStringBuilder.reflectionToString(this); } } import javax.persistence.Entity; /** */ @Entity public class Cat extends Animal { private Integer livesLeft; public Cat() { livesLeft = 9; } public Cat(String name, Integer age, Integer livesLeft) { super(name, age); this.livesLeft = livesLeft; } public Integer getLivesLeft() { return livesLeft; } public void setLivesLeft(Integer livesLeft) { this.livesLeft = livesLeft; } } import org.apache.commons.lang.builder.ToStringBuilder; import javax.persistence.Entity; /** */ @Entity public class Dog extends Animal { private Boolean floppyEars; public Dog() { } public Dog(String name, Integer age, Boolean floppyEars) { super(name, age); this.floppyEars = floppyEars; } public Boolean getFloppyEars() { return floppyEars; } public void setFloppyEars(Boolean floppyEars) { this.floppyEars = floppyEars; } } import org.apache.commons.lang.builder.ToStringBuilder; import javax.persistence.*; import java.util.List; /** */ @Entity public class Family { private Integer id; private String name; private List<Cat> cats; private List<Dog> dogs; public Family() { } public Family(String name) { this.name = name; } @Id @GeneratedValue(strategy= GenerationType.IDENTITY) public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name="family_id") public List<Cat> getCats() { return cats; } public void setCats(List<Cat> cats) { this.cats = cats; } @OneToMany(fetch = FetchType.LAZY, cascade = CascadeType.ALL) @JoinColumn(name="family_id") public List<Dog> getDogs() { return dogs; } public void setDogs(List<Dog> dogs) { this.dogs = dogs; } public String toString() { return ToStringBuilder.reflectionToString(this); } } import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import javax.persistence.EntityManager; import java.util.ArrayList; /** */ public class Test { public static void main(String[] args) { EntityManagerFactory factory = Persistence.createEntityManagerFactory("test"); EntityManager em = factory.createEntityManager(); // Populate the database... // Family 1 Family fam1 = new Family("Jones"); fam1.setCats(new ArrayList<Cat>()); fam1.getCats().add(new Cat("Fluffy", 3, 9)); fam1.getCats().add(new Cat("Fighter", 7, 3)); fam1.setDogs(new ArrayList<Dog>()); fam1.getDogs().add(new Dog("Fido", 15, false)); // // Family 2 Family fam2 = new Family("Smith"); fam2.setDogs(new ArrayList<Dog>()); fam2.getDogs().add(new Dog("buster", 11, true)); // Write to the database em.getTransaction().begin(); em.persist(fam1); em.persist(fam2); em.flush(); em.getTransaction().commit(); // Now do some selects... // Get all animals older than 5 System.out.println("Animals older than 5: " + em.createQuery("SELECT animal FROM Animal animal WHERE animal.age > 5").getResultList()); System.out.println("Cats older than 5: " + em.createQuery("SELECT cat FROM Cat cat WHERE cat.age > 5").getResultList()); System.out.println("Dogs older than 5: " + em.createQuery("SELECT dog FROM Dog dog WHERE dog.age > 5").getResultList()); // Get all families who have dogs with floppy ears... System.out.println("Families with floppy eared dogs: " + em.createQuery("SELECT family FROM Family family WHERE family.dogs.floppyEars = true").getResultList()); // Get all families who have cats with less than their nine lives left System.out.println("Families with cats who have used more than half their lives: " + em.createQuery("SELECT family FROM Family family WHERE family.cats.livesLeft < 5").getResultList()); // Get all families who have dogs that are older than 10 years. // @todo broken version with implicit join // System.out.println("Families who have old dogs: " + em.createQuery("SELECT family FROM Family family WHERE family.dogs.age > 10").getResultList()); System.out.println("Families who have old dogs: " + em.createQuery("SELECT family FROM Family family JOIN family.dogs AS dog WHERE dog.age > 10").getResultList()); } } <persistence> <persistence-unit name="test"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <class>Animal</class> <class>Cat</class> <class>Dog</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> <property name="hibernate.hbm2ddl.auto" value="create-drop"/> <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/> <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/> <property name="hibernate.connection.username" value="sa"/> <property name="hibernate.connection.password" value=""/> <property name="hibernate.connection.url" value="jdbc:hsqldb:mem:test"/> <property name="hibernate.max_fetch_depth" value="3"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> </properties> </persistence-unit> </persistence> Generated sql for family queries: with implicit join (fails) select family0_.id as id3_, family0_.name as name3_ from Family family0_, Dog dogs1_ where family0_.id=dogs1_.family_id and dogs1_1_.age>10 with explicit join (works) select family0_.id as id3_, family0_.name as name3_ from Family family0_ inner join Dog dogs1_ on family0_.id=dogs1_.family_id inner join Animal dogs1_1_ on dogs1_.id=dogs1_1_.id where dogs1_1_.age>10 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: George D. (JIRA) <no...@at...> - 2006-05-31 21:00:21
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HB-1042?page=comments#action_23216 ] George Dawoud commented on HB-1042: ----------------------------------- Hey Gavin, Do you know what ver of Hibernate the fix is in... or how do i switch to the new parser. > Values beginning with colon treated as named parameters > ------------------------------------------------------- > > Key: HB-1042 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-1042 > Project: Hibernate2 > Type: Bug > Components: core > Versions: 2.1.2 > Environment: Windows XP Pro, HSQL > Reporter: Harel E. > Assignee: Christian Bauer > Priority: Minor > > > The HQL above fails with the error "Not all named parameters have been set". > This is because the ':' is interpreted as the start of a named parameter. There seems to be no way to 'escape' the colon to make Hibernate treat it like a regular character. > http://forum.hibernate.org/viewtopic.php?t=932002&start=0&postdays=0&postorder=asc&highlight= -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-31 19:40:38
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1801?page=all ] Emmanuel Bernard resolved HHH-1801: ----------------------------------- Resolution: Rejected method reflection is certainly much slower than string comparison. And the hashtable operation is pretty slow too. As per the doc "Essentially all of the methods of the Session interface correlate to an event. You have a LoadEvent, a FlushEvent, etc (consult the XML configuration-file DTD or the org.hibernate.event package for the full list of defined event types)." Did you check the doc and the DTD? > Event names for Configuration.setEventListener() should be fixed and documented. > -------------------------------------------------------------------------------- > > Key: HHH-1801 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1801 > Project: Hibernate3 > Type: Bug > Components: core > Versions: 3.2.0.alpha2 > Reporter: Jak Mang > > > There should be public static constants defined for the name parameter of Configuration.setEventListener(). That way, even if they *are not* documented, the JavaDoc will pick them up. I don't know why these were not integers or enums instead of strings. > I had to go to look at the source to find the correct names and who knows if someone will change them and break my code. > The implementation is pretty slow and fat with all of the string comparisons, but it probably does not matter since it is a startup issue. You could use a static hash string to integer and a switch. > Another alternative would be to do reflection on the listener object. You would need to handle the case where an object implemented multiple interfaces. This would make the user/caller code quite brief. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Jak M. (JIRA) <no...@at...> - 2006-05-31 18:20:17
|
Event names for Configuration.setEventListener() should be fixed and documented. -------------------------------------------------------------------------------- Key: HHH-1801 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1801 Project: Hibernate3 Type: Bug Components: core Versions: 3.2.0.alpha2 Reporter: Jak Mang There should be public static constants defined for the name parameter of Configuration.setEventListener(). That way, even if they *are not* documented, the JavaDoc will pick them up. I don't know why these were not integers or enums instead of strings. I had to go to look at the source to find the correct names and who knows if someone will change them and break my code. The implementation is pretty slow and fat with all of the string comparisons, but it probably does not matter since it is a startup issue. You could use a static hash string to integer and a switch. Another alternative would be to do reflection on the listener object. You would need to handle the case where an object implemented multiple interfaces. This would make the user/caller code quite brief. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-05-31 17:02:30
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1526?page=all ] Steve Ebersole closed HHH-1526: ------------------------------- Resolution: Fixed documented as per "pretty please" user request > Improved DTDEntityResolver > -------------------------- > > Key: HHH-1526 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1526 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Priority: Minor > Fix For: 3.2.0.alpha1, 3.1.3 > > > Modify DTDEntityResolver to allow entity-includes to also be looked up via classpath. > Also, allow the EntityResolver to use to be declared as a config option (hibernate.xml.entity_resolver) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-31 16:38:38
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1800?page=all ] Emmanuel Bernard resolved HHH-1800: ----------------------------------- Resolution: Fixed > session.get() / load() should raise exception when the id is of the wrong type > ------------------------------------------------------------------------------ > > Key: HHH-1800 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1800 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Priority: Minor > Fix For: 3.2.0 > > > TypeMismatchException -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-31 16:38:38
|
[ http://opensource.atlassian.com/projects/hibernate/browse/EJB-189?page=all ] Emmanuel Bernard resolved EJB-189: ---------------------------------- Resolution: Fixed > em.getReference() should raise IllegalArgumentException if the id is of the wrong type > -------------------------------------------------------------------------------------- > > Key: EJB-189 > URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-189 > Project: Hibernate Entity Manager > Type: Bug > Components: EntityManager > Versions: 3.2.0.cr1 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Priority: Minor > Fix For: 3.2.0 > > -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-31 16:33:35
|
session.get() / load() should raise exception when the id is of the wrong type ------------------------------------------------------------------------------ Key: HHH-1800 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1800 Project: Hibernate3 Type: Improvement Components: core Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Priority: Minor Fix For: 3.2.0 TypeMismatchException -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-31 16:31:33
|
em.getReference() should raise IllegalArgumentException if the id is of the wrong type -------------------------------------------------------------------------------------- Key: EJB-189 URL: http://opensource.atlassian.com/projects/hibernate/browse/EJB-189 Project: Hibernate Entity Manager Type: Bug Components: EntityManager Versions: 3.2.0.cr1 Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Priority: Minor Fix For: 3.2.0 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-31 15:55:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-356?page=all ] Emmanuel Bernard resolved ANN-356: ---------------------------------- Resolution: Fixed > Clear the PC on Rollback on RESOURCE_LOCAL Transactions > ------------------------------------------------------- > > Key: ANN-356 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-356 > Project: Hibernate Annotations > Type: Improvement > Components: binder > Reporter: Emmanuel Bernard > Fix For: 3.2.0 > > > Not in the spec, but a good thing anyway -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-31 15:45:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-354?page=all ] Emmanuel Bernard resolved ANN-354: ---------------------------------- Resolution: Rejected allocationSize=1 > @javax.persistence.SequenceGenerator defaults to 'seqhilo' strategy. > -------------------------------------------------------------------- > > Key: ANN-354 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-354 > Project: Hibernate Annotations > Type: Improvement > Versions: 3.2.0.cr1 > Reporter: Andrey Petrov > > > When using an oracle-style sequence to auto generate primary key values like this: > @Id > @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="MySeq") > @SequenceGenerator(name="MySeq", sequenceName="ORACLE_SEQ") > public long getId() { > return id; > } > then a org.hibernate.id.SequenceHiLoGenerator is always used. > There should be a way to configure a different generator! > Since the hilo generator is not suitable for my application I have to use this instead: > @Id > @GeneratedValue(generator="MySeq") > @GenericGenerator( > //this is a hibernate-specific hack to force the use of a regular sequence generator > //otherwise a sequencehilo generator is used by default :-((( > name = "MySeq", strategy = "sequence", parameters = { > @Parameter(name = "sequence", value = "ORACLE_SEQ") > } > ) > public long getId() { > return id; > } > Now this works fine and while this solution can be tolerated for my app I really wish there was another way to control the default generator strategy (sequencehilo or plain sequence) without resorting to hibernate-specific org.hibernate.annotations.GenericGenerator annotations. > Do you think a mechanism for configuring that can be added to a future hibernate annotations version? > p.s. > as long as i can see the seqhilo generation strategy is hardcoded in: > org.hibernate.cfg.AnnotationBinder.java:1925: case SEQUENCE: > org.hibernate.cfg.AnnotationBinder.java:1926: return "seqhilo"; > (in hibernate annotations version 3.2.0.cr1) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-31 15:33:19
|
Clear the PC on Rollback on RESOURCE_LOCAL Transactions ------------------------------------------------------- Key: ANN-356 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-356 Project: Hibernate Annotations Type: Improvement Components: binder Reporter: Emmanuel Bernard Fix For: 3.2.0 Not in the spec, but a good thing anyway -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Steve E. (JIRA) <no...@at...> - 2006-05-31 12:19:21
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1796?page=comments#action_23212 ] Steve Ebersole commented on HHH-1796: ------------------------------------- From my understanding, yes that is the case. Although to clarify it is a "global lock" on the root node only when children (i.e. our regions) are added or removed. Manipulating data within one of our regions should not be an issue (any more than it is even with this change). > TreeCache based providers and Fqn > --------------------------------- > > Key: HHH-1796 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1796 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.2.0 > > > Apparently we have not been using tree cache in the most proper manner in regards to Fqn construction. The way in which we construct Fqns actually leads to a very flat tree structure. For example consider a region for "org.hibernate.test.hql.Animal"; this actually leads to a tree node structured like: > /org/hibernate/test/hql/Animal > /id1 > /id2 > /... > Notice that the Hibernate region-name leads to a flat node which is a direct child of the root node... > The issue is twofold: > 1) This may be one of the causes of the high level of contention in the older pessimistic TreeCache model > 2) This is currently causing problems with the optimistic locking stuff because the "parent" node is version-incremented whenever its children is mutated (child added/removed) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: zaid s. k. (JIRA) <no...@at...> - 2006-05-31 12:19:21
|
wrong generation of class alias ------------------------------- Key: HB-1558 URL: http://opensource.atlassian.com/projects/hibernate/browse/HB-1558 Project: Hibernate2 Type: Bug Components: core Versions: 2.1.1 Environment: hibernate, oracle10g Reporter: zaid saeedi khan Hi, I have a table USERROLE as follows: USERID ROLEID 1 1 1 2 2 2 2 3 2 1 I want the following SQL query select ur1.USERID, (select count(ur2.roleid) from userrole ur2 where ur1.userid=ur2.userid) from userrole ur1 group by userid output is: 1 2 2 3 i.e. I simply want to show the number of roles against each user. Now when I use hibernate, I make use of derived property and specify the subselect in the formula attribute. I have GroupBy.hgm.xml mapped to USERROLE and GroupBy.java as model which consists of id and count. I use Session session = sessionFactory.openSession(); String query = "from GroupBy gb group by gb.userId"; List results = session.find(query); BUT THE PROBLEM IS HIBERNATE DOES NOT ACCEPT gb AS THE TABLE ALIAS RATHER AS SHOWN BELOW IT GENERATES groupby0_ AS THE ALIAS. Hibernate: select groupby0_.USERID as USERID, (select count(*) from USERROLE ur1 where ur1.userId=groupby0_.userId) as f0_ from USERROLE groupby0_ group by groupby0_.USERID SO TO PERFORM MY QUERY I HAD TO HARDCODE(VERY BAD) groupby0_ IN THE FORMULA ATTRIBUTE AS FOLLOWS: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="com.a.test.model.GroupBy" table="USERROLE"> <id name="userId" column="USERID"> <generator class="increment"/> </id> <property name="count" formula="(select count(*) from USERROLE ur1 where ur1.userId=groupby0_.userId)" /> </class> </hibernate-mapping> Please help me to workaround this problem. Thanks in advance. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Brice L. (JIRA) <no...@at...> - 2006-05-31 09:55:37
|
Order column is not taken in count when retreiving a list --------------------------------------------------------- Key: HHH-1799 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1799 Project: Hibernate3 Type: Bug Components: query-hql Versions: 3.1.3 Environment: jonas 4.1.4, jre 1.4.2_08, hibernate 3.1.3 Reporter: Brice Laurencin Priority: Minor Attachments: mapping.zip see the mapping files. Using that HQL query : select tDesc.taches from TraitementDesc tDesc where tDesc.application.nom = :app and tDesc.typeFlux.label = :tFlux and tDesc.typeTraitement.label = :tTrtmnt The list returned is not ordered with the list-index column, as I expected. I removed the select clause in the query, and when I get the taches back, it works like a charm. But still, I wonder why the first query doesn't work. Brice. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-31 09:27:22
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1796?page=comments#action_23211 ] Max Rydahl Andersen commented on HHH-1796: ------------------------------------------ just so i understand this the problem with our previous behavior is that the "parent" would be the root node which would basically mean it effectively a global lock ? > TreeCache based providers and Fqn > --------------------------------- > > Key: HHH-1796 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1796 > Project: Hibernate3 > Type: Improvement > Components: core > Reporter: Steve Ebersole > Assignee: Steve Ebersole > Fix For: 3.2.0 > > > Apparently we have not been using tree cache in the most proper manner in regards to Fqn construction. The way in which we construct Fqns actually leads to a very flat tree structure. For example consider a region for "org.hibernate.test.hql.Animal"; this actually leads to a tree node structured like: > /org/hibernate/test/hql/Animal > /id1 > /id2 > /... > Notice that the Hibernate region-name leads to a flat node which is a direct child of the root node... > The issue is twofold: > 1) This may be one of the causes of the high level of contention in the older pessimistic TreeCache model > 2) This is currently causing problems with the optimistic locking stuff because the "parent" node is version-incremented whenever its children is mutated (child added/removed) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Olaf (JIRA) <no...@at...> - 2006-05-31 08:55:24
|
multiple outer joins producing wrong SQL ---------------------------------------- Key: HHH-1798 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1798 Project: Hibernate3 Type: Bug Components: query-hql Versions: 3.1.3 Environment: Hibernate 3.1.3 with DB2 8.2. Problem occurs with AST parser and classic parser. Reporter: Olaf Hibernate seems to wrongly "optimize away" multiple outer joins of same table: Following HQL --------------------- select OrderImpl_AVS_1.Value, OrderImpl_AVS_2.Value from OrdersImpl as ord left outer join ord.AttributeValueSet as avs_OrderImpl left outer join avs_OrderImpl.AttributeValueSetValueSet as avss_OrderImpl left outer join avss_OrderImpl.AttributeValue as OrderImpl_AVS_1 with OrderImpl_AVS_1.Attribute=1001101 left outer join avss_OrderImpl.AttributeValue as OrderImpl_AVS_2 with OrderImpl_AVS_2.Attribute=1001102 join ord.OrderItemSet as ois , Users as orderer, Consumer as con, .... statement continues ... generates the following SQL: ---------------------------------------- select attributev4_.VALUE as col_4_0_, attributev4_.VALUE as col_5_0_ from WEBSHOP.ORDERS ordersimpl0_ left outer join WEBSHOP.ATTRIBUTE_VALUE_SET attributev2_ on ordersimpl0_.ATTRIBUTE_VALUE_SET_ID=attributev2_.ID left outer join WEBSHOP.ATTRIBUTE_VALUE_SET_VALUE attributev3_ on attributev2_.ID=attributev3_.ATTRIBUTE_VALUE_SET_ID left outer join WEBSHOP.ATTRIBUTE_VALUE attributev4_ on attributev3_.ATTRIBUTE_VALUE_ID=attributev4_.ID and (attributev4_.ATTRIBUTE_ID=1001102) inner join WEBSHOP.ORDER_ITEM orderitems6_ on ordersimpl0_.ID=orderitems6_.ORDERS_ID and orderitems6_.subclass in (1,2,3,4,5,6,7), WEBSHOP.USERS users7_, WEBSHOP.CONSUMER consumer8_, .... statement continues ... which is semantically wrong. As you can see the two outer joins of the Table "AttributeValue" with the aliases OrderImpl_AVS_1 and OrderImpl_AVS_2 are combined by Hibernate into one outer join with alias "attributev4_" even though the with conditions differ ! Seems that the second outer join overwrites the first. BTW: ==== the Porblem also occurs if you remove the with clause and define the additional conditions in the where clause, like and (OrderImpl_AVS_1.Attribute=1001101 or OrderImpl_AVS_1.Attribute is null) and (OrderImpl_AVS_2.Attribute=1001102 or OrderImpl_AVS_2.Attribute is null) in this case hibernate just ignores the first "and ..." condition and only generates SQL for the second -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-31 08:30:19
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HBX-669?page=comments#action_23210 ] Max Rydahl Andersen commented on HBX-669: ----------------------------------------- http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3947721#3947721 So 1. target @NamedQuery(ies) and hbm/ ejb3 DD 2. target simple strings (createQuery("...") or createQuery(CONSTANTS) 3. do some magic-ish things for more complex strings :-) 1 is cool 2 is fantastic 3 is a + but not that critical frankly > Code level HQL query validation > ------------------------------- > > Key: HBX-669 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-669 > Project: Hibernate Tools > Type: New Feature > Components: eclipse > Reporter: Emmanuel Bernard > > > When an Hibernate configuration is provided, the IDE should be able to validate a given HQL query written in the code and in the XML files > The code level warning would be a killer feature. > Note that the hard part for the code is to "reckognize" a string as HQL query. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-31 08:23:18
|
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-355?page=all ] Emmanuel Bernard resolved ANN-355: ---------------------------------- Resolution: Fixed > Make XML overriding rules for access type smoother > -------------------------------------------------- > > Key: ANN-355 > URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-355 > Project: Hibernate Annotations > Type: Improvement > Components: binder > Versions: 3.2.0.cr1 > Reporter: Emmanuel Bernard > Assignee: Emmanuel Bernard > Priority: Minor > Fix For: 3.2.0 > > > If explicit, use it > if no explicit and is not complete and has @Id use it > if complete and no explicit, use PROPERTY -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Emmanuel B. (JIRA) <no...@at...> - 2006-05-31 08:21:18
|
Make XML overriding rules for access type smoother -------------------------------------------------- Key: ANN-355 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-355 Project: Hibernate Annotations Type: Improvement Components: binder Versions: 3.2.0.cr1 Reporter: Emmanuel Bernard Assigned to: Emmanuel Bernard Priority: Minor Fix For: 3.2.0 If explicit, use it if no explicit and is not complete and has @Id use it if complete and no explicit, use PROPERTY -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Andrey P. (JIRA) <no...@at...> - 2006-05-31 07:59:17
|
@javax.persistence.SequenceGenerator defaults to 'seqhilo' strategy. -------------------------------------------------------------------- Key: ANN-354 URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-354 Project: Hibernate Annotations Type: Improvement Versions: 3.2.0.cr1 Reporter: Andrey Petrov When using an oracle-style sequence to auto generate primary key values like this: @Id @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="MySeq") @SequenceGenerator(name="MySeq", sequenceName="ORACLE_SEQ") public long getId() { return id; } then a org.hibernate.id.SequenceHiLoGenerator is always used. There should be a way to configure a different generator! Since the hilo generator is not suitable for my application I have to use this instead: @Id @GeneratedValue(generator="MySeq") @GenericGenerator( //this is a hibernate-specific hack to force the use of a regular sequence generator //otherwise a sequencehilo generator is used by default :-((( name = "MySeq", strategy = "sequence", parameters = { @Parameter(name = "sequence", value = "ORACLE_SEQ") } ) public long getId() { return id; } Now this works fine and while this solution can be tolerated for my app I really wish there was another way to control the default generator strategy (sequencehilo or plain sequence) without resorting to hibernate-specific org.hibernate.annotations.GenericGenerator annotations. Do you think a mechanism for configuring that can be added to a future hibernate annotations version? p.s. as long as i can see the seqhilo generation strategy is hardcoded in: org.hibernate.cfg.AnnotationBinder.java:1925: case SEQUENCE: org.hibernate.cfg.AnnotationBinder.java:1926: return "seqhilo"; (in hibernate annotations version 3.2.0.cr1) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Michael M. (JIRA) <no...@at...> - 2006-05-31 05:08:19
|
<set> inside of a <join> ------------------------ Key: HHH-1797 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1797 Project: Hibernate3 Type: Improvement Components: metamodel, core Environment: n/a Reporter: Michael Masters I want to be able to use the following mapping. The problem I face is that a <set> cannot exist in a <join>. <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping package="com.digitaldarwin.hibernate.model"> <class name="Event" table="Event"> <id name="id" column="eventId"> <generator class="native"> <param name="sequence">event_eventid_seq</param> </generator> </id> <discriminator column="eventType" type="string"/> <subclass name="Enforcement" discriminator-value="enforcement"> <join table="Enforcement"> <key column="eventId"/> <property name="name" column="name"/> </join> </subclass> <subclass name="LicensePlateSuspend" discriminator-value="license plate suspend"> <join table="LicensePlateSuspend"> <key column="licensePlateSuspendId"/> <set name="licensePlates"> <key> <column name="licensePlateSuspendId"/> <column name="licensePlate"/> </key> <one-to-many class="LicensePlate"/> </set> </join> </subclass> </class> </hibernate-mapping> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |
From: Max R. A. (JIRA) <no...@at...> - 2006-05-30 18:09:17
|
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1792?page=comments#action_23209 ] Max Rydahl Andersen commented on HHH-1792: ------------------------------------------ we will probably implement <sql-insert callable="true" rowcount="true|false"> > Callable update/insert/delete statements should not force rowcount out parameter > -------------------------------------------------------------------------------- > > Key: HHH-1792 > URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1792 > Project: Hibernate3 > Type: Deprecation > Components: core > Versions: 3.1.3, 3.2.0.cr2 > Reporter: Max Rydahl Andersen > Priority: Blocker > Fix For: 3.2.0 > > > the current handling of <sql-insert>, <sql-update>, <sql-delete> when callable="true" is broken. > It "forcefully" requires users to have an out parameter at the first position that returns the rowcount and then simply ignores it! > This only became obvious when trying to use the sql-update on DB2 where executeUpdate returns -1 opposed to what is done > on Oracle and MS SQL Server. > We need to fix this by either: > a) actually start using this value (which requires the SP to return an expected value which in most cases just will be 1 or 0) > b) remove the need for this parameter and simply let the SP handle the error handling > I vote for B even though it will break backwards compability, since if they were using the old way they would either have failed on every operation (if running on DB2) or having the code silently ignore any possible update/delete rowcount mismatches. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira |