合并复杂对象时堆栈红色区域访问无效
我用的是玩!项目上的框架 1.2.4 将对象从外部上下文(实际上是 Flex)传递到服务。 网关使用 cinnamon 框架 (http://www.spicefactory.org/pimento/) 来处理路由到服务的 AMF 请求。
因此,我收到分离的对象,并且我试图通过简单地调用来避免进入复杂的合并问题:
JPA.em().merge(myObject)
它对简单的对象起作用,但是当涉及到更复杂的对象时,我遇到以下错误,该错误只是关闭了服务器(这很顽皮)
Invalid access of stack red zone
的简化概述
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@DiscriminatorColumn(name = "templateType")
ProductTemplate extends GenericModel
|- @OneToMany(mappedBy = "productTemplate", cascade = CascadeType.ALL)
| List<ProductTemplateLang> translations;
|
| @MappedSuperclass
|_ LayeredProductTemplate
|
| @Entity
|_ Book
|- @OneToMany(mappedBy = "book", cascade = CascadeType.ALL)
| List<BookPage> pages;
这是我的 JPA 映射With
@Entity
BookPage extends Model
|- @OneToMany(mappedBy = "page", cascade = CascadeType.ALL)
| List<Layer> layers;
And
@Entity
Layer extends Model
|- @OneToMany(mappedBy = "layer", cascade = CascadeType.ALL)
| List<LayerLang> translations;
(我删除了大部分属性) 难道是因为我收到的对象太复杂了?
我试图手工完成所有事情,但也遇到了“找到同一集合的两个表示”,这有点难以弄清楚......
任何帮助、想法、方向都非常感谢!
谢谢
I'm using play! framework 1.2.4 on a project who passes objects from an external context (Flex actually) to a service.
The gateway uses the cinnamon framework (http://www.spicefactory.org/pimento/) to handle AMF requests to be routed to services.
I thus receive detached objects, and I'm trying to avoid entering complex merging issues by simply calling:
JPA.em().merge(myObject)
It does the trick for simple objects, but when it comes to a more complex object, I run across the following error which simply shuts down the server (which is naughty)
Invalid access of stack red zone
Here is a simplified overview of my JPA mapping
@Entity
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@DiscriminatorColumn(name = "templateType")
ProductTemplate extends GenericModel
|- @OneToMany(mappedBy = "productTemplate", cascade = CascadeType.ALL)
| List<ProductTemplateLang> translations;
|
| @MappedSuperclass
|_ LayeredProductTemplate
|
| @Entity
|_ Book
|- @OneToMany(mappedBy = "book", cascade = CascadeType.ALL)
| List<BookPage> pages;
With
@Entity
BookPage extends Model
|- @OneToMany(mappedBy = "page", cascade = CascadeType.ALL)
| List<Layer> layers;
And
@Entity
Layer extends Model
|- @OneToMany(mappedBy = "layer", cascade = CascadeType.ALL)
| List<LayerLang> translations;
(I removed most of the properties)
Can it be due to the fact the object I receive is too complex?
I'm trying to do everything by hand but also encounter a "Found two representations of same collection" which is kind of tricky to figure out...
Any help, thoughts, direction are greatly appreciated!
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于那些感兴趣的人,我必须手动合并所有内容才能让我的东西正常工作。
我仍然没有回答这个问题,以防 Play 大师有解释/问题来解决此类问题。
干杯!
For those interested, I had to merge everything manually to get my stuff to work.
I still let this question unanswered in case a Play guru has an explanation / question to move forward with this kind of problem.
Cheers!