tracker issue : CF-3037947

select a category, or use search below
(searches all categories and all time range)
Title:

Bug 76073:[JFERNANDES]Remoting calls made to a service which return ORM entities with lazy properties don't honor laziness

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): João Fernandes / João Fernandes (Joao Fernandes)

Created: 03/18/2009

Components: Flex/Flash, Flex remoting

Versions: 9.0

Failure Type: Unspecified

Found In Build/Fixed In Build: 0000 /

Priority/Frequency: Major / Unknown

Locale/System: English / Platforms All

Vote Count: 9

Problem:

[JFERNANDES]Remoting calls made to a service which return ORM entities with lazy properties don't honor laziness. 

there should be a way to configure how deep the remoting should send back to the client and different levels.

remoting-config.xml

<hierarchy-level>"entity|entity-and-pk|entity-and-children|full"</hierarchy-level>

Application.cfc 
<cfset this.ormsettings['hierarchy-level'] = "entity|entity-and-pk|entity-and-children|full">

this could eventually be override at component level (target remoting cfc) or at function level. Of course a property marked as lazy wouldn't ever be fetched to be sent to the client.




Method:

1) Create an entity with a lazy many-to-one property.
2) invoke a service which return some entities.
3) check that the supposed lazy loaded entity is in fact fully loaded in flex side.
Result:

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3037947

External Customer Info:
External Company:  
External Customer Name: João Fernandes
External Customer Email: 4E9A42C244586146992015D5
External Test Config: 03/18/2009

Attachments:

Comments:

This bug has been voted..
Vote by External U.
23917 | November 10, 2011 07:18:58 PM GMT
This bug has been voted..
Vote by External U.
23918 | November 10, 2011 07:18:59 PM GMT
This bug has been voted..
Vote by External U.
23919 | November 10, 2011 07:19:00 PM GMT
This bug has been voted..
Vote by External U.
23920 | November 10, 2011 07:19:01 PM GMT
I think that lazy loading in Flex/CF 9 apps should be addressed in some way. dpHibernate seems like an interesting solution. I wonder if the CF team could leverage that project.
Vote by External U.
23921 | November 10, 2011 07:19:02 PM GMT
I've got 3 tables connected in many-to-many and without this feature working I have to decide if my associated arrays will be null or never-ending. Not good choices.
Vote by External U.
23922 | November 10, 2011 07:19:03 PM GMT
Very surprising that lazy loading is not working in CF9... it's one of the most important feature of hibernate.
Vote by External U.
23923 | November 10, 2011 07:19:04 PM GMT
Definitely hope to see this addressed in an update, it's a critical area for using ORM with Flex.
Vote by External U.
23924 | November 10, 2011 07:19:05 PM GMT
I'm not sure if the proposed solution is the best way to go, but lazy loading ORM CFCs needs to be addressed.
Vote by External U.
23925 | November 10, 2011 07:19:06 PM GMT