This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | "Enitty Classes from Database" needs CascadeType.PERSIST | ||
---|---|---|---|
Product: | javaee | Reporter: | err <err> |
Component: | Persistence | Assignee: | Sergey Petrov <sj-nb> |
Status: | RESOLVED INCOMPLETE | ||
Severity: | blocker | ||
Priority: | P3 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
err
2009-09-13 03:19:45 UTC
I just found: 12.2.1.5 cascade-persist The cascade-persist subelement applies to all relationships in the persistence unit. Specifying this subelement adds the cascade persist option to all relationships in addition to any settings specified in annotations or XML. The cascade-persist subelement may not be overridden in this release. The ability to override the cascade-persist of the persistence-unit-defaults element will be added in a future release of this specification. so as far as I'm concerned you can close this issue. (BTW, I'm beginning to think that CascadeType.ALL should not be used for the auto-gen'd stuff, unless there are user options to turn individual flags on/off. When individual cascades are needed, probably best to include them individually rather than turning everything on.) Can you provide code for Eventtype, Chart, Event? I see no in 172095. Or schema if entities are generated. Or may be sql script to create tables as schema may not contain necessary all information. Why you do think Cascade.PERSIST should be added in generation? May be another users would like to have more control by default instead of cascade actions. May be I miss something. If it's inconsistent with some similar use case where Cascade.ALL is added, can you provide an example? looks like project in issue 172943 contain all classes. even with 172943 project, it's not yet clear what code part is specified above and when CascadeType.ALL is generated when it should not, as I can't find complete sample. Tried to find sql from issue 172943, generate entities for event and chart and both have no cascade specification at all. So if you know more now to describe the problem more clearly, please reopen the issue as I'm not sure what's the issue is. mark as incomplete for now. |