These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: object graph for type contains cycles and cannot be serializ
PostPosted: Wed Nov 19, 2008 3:20 am 
Newbie

Joined: Mon Sep 08, 2008 2:37 am
Posts: 6
Hi,

i am Trying to get the EmployeeDetails through NHIBERNATE
i defined the EmployeeDetails class and properties and mapped to nhibernate mapping file(EmployeeDetails.hbm.xml)

now i am trying to get data from WCF SErvice
from wcf service i called the below method

Code:
public IList<EmployeeDetails>  GetEmployees()
        {
            //Session.EnableFilter("CheckStatus").SetParameter("CheckDefaultStatus", "T");
            //Session.EnableFilter("CheckLocationStatus").SetParameter("CheckDefaultLocationStatus", "T");
            IQuery query = Session.CreateQuery("from EmployeeDetails");
            IList<EmployeeDetails> empdetails = query.List<EmployeeDetails>();
            return empdetails;
            //return null;
        }


this code is returning EmployeeDetails into Wcf service
inturn i am calling the wcf corresponding method from ui
this method is throwing error saying

There was an error while trying to serialize parameter http://tempuri.org/:getEmployeesResult. The InnerException message was 'Object graph for type 'InfraStructureLayerSample.EmployeeDetails' contains cycles and cannot be serialized if reference tracking is disabled.'. Please see InnerException for more details.

can anyone help me

_________________
loknath


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.