Hi All,
I am looking into bug number 82409 which is asking for better error reporting in ORM. While I agree that there is room for improvement in this area and we have done a few already, I am looking for more specific pointers on this.
Could you please let us know those specific errors so that I can focus on them and get those fixed.
We have tried to report those errors that can be figured out with the CFC definition. The only area where we are kind of helpless is when the error is thrown by Hibernate.
Regards,
Rupesh
The error occurred in C:\web\Application.cfc: line 16 | |
14 : 15 : function onRequestStart() { 16 : ormReload(); 17 : |
Caused by: java.sql.SQLSyntaxErrorException: Syntax error: Encountered "," at line 1, column 35.
Rupesh,
If you can’t change Hybernate’s error messages, maybe you could capture (when the developer has enabled robust error handling or hit some other hibernate specific setting in the admin) the request before it goes to hibernate and check it for syntax and or other types of errors and return a message stating “possible errors in your cform calls” with the possibly offending code?
Mark
I believe you are referring to the hibernate validation framework. This actually comes as a separate framework to hibernate.
It has the functionality you are looking for, but it would be interesting to see how the engineers allow for extension through cfml.
Without being able to extend the validation framework, it's not very useful.
But it is a great feature request. Add it to the tracker, I'll vote for it.
Mark
Sent from my mobile device
On 12 May 2010 18:04, "Evagoras" <evag...@gmail.com> wrote:
Hi Rupesh.
How about an expanded validation framework for ORM? Right now, you can
add validation arguments inside your CFPROPERTY, but there is no way
to get all the errors before trying a SET or a SAVE (think of a form
submitting user input). Each individual cfproperty throws an
exception, one at a time. You know the inner-workings of this better
than I do. It's not friendly at all as it stands right now.
3 methods come to mind which would be super cool:
- validate()
- getErrors
- hasErrors()
We have been using Hyrule (http://hyrule.riaforge.org/) by Dan Vega to
go around this shortcoming, and we really like it. It would be great
if something like this could be implemented in the next CF update.
From what I gather, Dan is duplicating Hibernate functionality, so his
method might be easier to implement behind the scenes, if HIbernate
already has support for this.
--
You received this message because you are subscribed to the Google Groups "cf-orm-dev" group.
T...
How about an expanded validation framework for ORM?
I ran ormReload() several times and that didn't fix it. Then I touched Contact.cfc, effectively removing a comment, and now the error has disappeared (good) and I can't get it to return by reinserting the comment (puzzled). I am sure I reinserted the comment exactly as it was.
Sorry this is less useful than I wanted it to be in terms of providing a reproducible example.
Nando