Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
It seems that qtags that have a int return type are implicitely mandatory. (can not be unspecified)
Here's a little patch that outlines the problem.
I noticed this while trying to use the hibernate plugin. If i did not specify the "length" attribute of the @hibernate.property tag, i got null pointer exceptions from there.
The problem with this patch is that, it returns 0, like a default value, which makes it quite wrong with the hibernate plugin. (makes the test cases fail because this has a lenght="0" to some of the general xml elements - on the other hand, i wonder how come it works in the testcase and not with my application, but I did not really dig much into this)
I think the best would be to simply forbid int return value in tag attributes, and only support Integer, so that the plugin can make a difference between null and zero.
Any thoughts?
Well, it's a good question whether to disallow primitive values
( but if we diasallow "int", we shall also diasllow "boolean" )
For now I will apply your patch and modify hibernate plugin for nullable length.