[Hibernate-JIRA] Created: (ANN-802) @Formula annotation does not set value into bean property
by Lincoln Baxter, III (JIRA)
@Formula annotation does not set value into bean property
---------------------------------------------------------
Key: ANN-802
URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-802
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.4.0.GA
Environment: HSQLDB
14:46:43,879 INFO Version:15 - Hibernate Annotations 3.4.0.GA
14:46:43,908 INFO Environment:543 - Hibernate 3.3.0.SP1
14:46:43,926 INFO Environment:576 - hibernate.properties not found
14:46:43,934 INFO Environment:709 - Bytecode provider name : javassist
14:46:43,941 INFO Environment:627 - using JDK 1.4 java.sql.Timestamp handling
14:46:44,040 INFO Version:14 - Hibernate Commons Annotations 3.1.0.GA
Reporter: Lincoln Baxter, III
The @Formula annotation never assigns the value of the query into the bean field. As you can see, it is being selected, but the field never receives the value. Everything else works fine.
@Formula("id + 4")
private int numWatchers;
A snippit of the generated SQL
select story0_.id as id9_1_, ....... story0_.id + 4 as formula0_1_, ...... where story0_.id=?
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[Hibernate-JIRA] Created: (HV-228) InvalidateStateException needs to show the error messages in the message when it's thrown
by Ken Egervari (JIRA)
InvalidateStateException needs to show the error messages in the message when it's thrown
-----------------------------------------------------------------------------------------
Key: HV-228
URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-228
Project: Hibernate Validator
Issue Type: New Feature
Affects Versions: 3.1.0.GA
Reporter: Ken Egervari
I dunno if you fixed this in 4.0 releases. To make testing easier, I think the error messages should be viewable when the exception is thrown. I know it's possible to inspect the exception for these errors, but within a unit test, this is just too much work and it's annoying.
In practice, we create all these objects and do tests. Sometimes these objects get sent to the database and are saved.
Now, let's say 3 validation constraints aren't met. On the outset, the developer is 100% blind and must code in a try/catch and print out the list of errors. When this happens over and over and over... it's just tedious. When a test fails because an unexpected validation exception is thrown, I don't want to have to do this - I want to instantly see what went wrong so I can make the changes to my test case and run it quickly.
I think this change would facilitate much faster test/code cycles, and it shouldn't be hard to add in.
Thanks
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years
[Hibernate-JIRA] Created: (HBX-970) POJO generation should have full contructor as an option
by Alberto A. Flores (JIRA)
POJO generation should have full contructor as an option
--------------------------------------------------------
Key: HBX-970
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-970
Project: Hibernate Tools
Issue Type: Bug
Components: hbm2java, reverse-engineer
Affects Versions: 3.2beta9
Environment: Hibernate3, Oracle 10g
Reporter: Alberto A. Flores
When using hbm2java (for reverse engineering the database to generate POJOs), there is no real way to declare full constructor generation as an option (which is not required in Hibernate anyway). In a large table, I found the error of "can't create a constructor with more than 255 parameters" (which could easily grow if you use inheritance). We had to fix the PojoContructors.ftl code to never generate that full contructor.
Potential fixes:
- Find a way to initialize the BasicPojoClass to initialize the needFullContructor using <property> in the hbm2java
- Using the <property> feature within hbm2java, fix the PojoConstructor.ftl to check for a variable that is (optionally) visible by virtue of the <property> tag instead of always checking for "pojo.needFullConstructor"
- Provide a way to replace BasicPojoClass as part of the hbm2java task. By default, this uses the hardcoded code to always use this template.
--
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....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years