小编Ahm*_*med的帖子

杰克逊与双向一对多关系混淆:未能懒惰地初始化集合

后端Spring MVC和Spring-data,spring-security.前端Angularjs.I使用的是弹簧3.1; Jackson 1.8; JPa 2.1和mysql.基本问题与多次询问相同.我有一个简单的程序,有两个POJO站点和typeSite-其中一个typeSite可以有多个站点.但是我收到以下错误:

org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: failed to lazily initialize a collection of role: TypeSites.sitees, could not initialize proxy - no Session (through reference chain: vo.TypeSitesListVO["typesites"]->java.util.UnmodifiableRandomAccessList[0]-model.TypeSites["sitees"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: failed to lazily initialize a collection of role: model.TypeSites.sitees, could not initialize proxy - no Session (through reference chain:vo.TypeSitesListVO["typesites"]->java.util.UnmodifiableRandomAccessList[0]->model.TypeSites["sitees"])   
 Caused by: com.fasterxml.jackson.databind.JsonMappingException: failed to lazily initialize a collection of role: model.TypeSites.sitees, could not initialize proxy - no Session (through reference chain: vo.TypeSitesListVO["typesites"]->java.util.UnmodifiableRandomAccessList[0]->model.TypeSites["sitees"])
Run Code Online (Sandbox Code Playgroud)

以及浏览器中的以下错误:

Failed to …
Run Code Online (Sandbox Code Playgroud)

lazy-loading jackson spring-data-jpa angularjs spring-data-rest

6
推荐指数
2
解决办法
5644
查看次数

AX2012 使用 Select 查询在数据网格视图中显示数据

我有新表格,我正在寻找在指定我自己的查询的 grid byn 中显示所有记录,该功能也可能是:

static void  queryVendtableSelect(Args _args)
{
    VendTable vendTable;

    while select firstOnly  *
    from vendTable
    order by   vendTable.AccountNum
     where vendTable.Blocked =="aaaaaaaaa"


    }
Run Code Online (Sandbox Code Playgroud)

我什么时候可以放这个字体?任何的想法。谢谢你

microsoft-dynamics ax x++ axapta dynamics-ax-2012

0
推荐指数
1
解决办法
9587
查看次数