Hi Chris,

Thanks for the response. I was just thinking there was an issue during
the entitysave but it returns void so there is no way to know if it
doesn't work? I will look at the debugging and take it from there

On Aug 3, 6:05 pm, Chris Blackwell <[email protected]> wrote:
> Hi Brett,
>
> The points you raise aren't specific to MG, but relevant nonetheless.   How
> do you trust ORM is a very interesting question, and i guess the best answer
> is that to trust it you must first understand how, when and why it does what
> it does.  When moving from cfquery to ORM based applications its a big step,
> I know that I spent many hours banging my head on the keyboard and more than
> once gave up and went back to using Reactor because I just had to get things
> done!
>
> Your problem sounds very much like your entity isn't being saved, despite
> calling ormflush.  Difficult to say why without seeing some code. I find
> that if in doubt (in fact always) use a transaction. In your Application.cfc
> set this.ormsettings.flushatrequestend = false, then wrap any CRUD
> operations in a transaction.
>
> transaction {
> p = getProductService().new();
> p.setName(title);
>  p.setBrand(brand);
> p.save();
>
> }
>
> As for debugging, i guess it depends on what you need.  Best place to start
> is to enable sql logging and there's a good article on that
> here<http://coldfused.blogspot.com/2009/07/coldfusion-orm-how-to-log-sql.html>
> .
>
> Chris
>
> On 3 August 2011 00:46, Brettski <[email protected]> wrote:
>
>
>
>
>
>
>
> > Hi,
>
> > How do people debug MG / CF ORM apps?
>
> > I was having an issue with an app where I would use ORM to update
> > (basically the status of a record from submitted to accepted), then
> > render a view (list of records). It rendered the changes, but if I
> > looked at the database the change wasn't there, and if I refreshed the
> > page the change was gone. I just replaced the orm stuff with cfquery's
> > and it worked, so that's got me by for now, and validates for me my
> > logic was correct but it leaves me with 2 issues which is:
>
> > 1) How do I trust ORM? I was doing an ormflush after entitysave and it
> > didn't help either
> > 2) How do I debug MG / CF ORM Apps?
>
> > Any help appreciated :)
>
> > b
>
> > --
> > Model-Glue Sites:
> > Home Page:http://www.model-glue.com
> > Documentation:http://docs.model-glue.com
> > Bug Tracker:http://bugs.model-glue.com
> > Blog:http://www.model-glue.com/blog
>
> > You received this message because you are subscribed to the Google
> > Groups "model-glue" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> >http://groups.google.com/group/model-glue?hl=en

-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to