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: | Entities are generated multiple times in RESTful web services | ||
---|---|---|---|
Product: | webservices | Reporter: | pez <pez> |
Component: | REST | Assignee: | Peter Liu <petertliu> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | ayubskhan, jungi, sustaining |
Priority: | P1 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
pez
2008-12-17 11:02:02 UTC
btw. the getPrdBug() call in the constructor was added in the plugin sometimes between v 0.8 and v 1.0.1, before it seemed to work properly ;-) Peter, Ayub, can I ask you to evaluate this issue ASAP, please? Thanks. btw: I'd like to add the fix for this to patch2 candidates list.... This is a bug in the generated code. The correct code should be /** * Returns a collection of PrdBugConverter. * * @return a collection of PrdBugConverter */ @XmlElement public Collection<PrdBugConverter> getPrdBug() { if (items == null) { items = new ArrayList<PrdBugConverter>(); } if (entities != null) { items.clear(); for (PrdBug entity : entities) { items.add(new PrdBugConverter(entity, uri, expandLevel, true)); } } return items; } The line added "getXYZ()" to the constructor for dealing with lazy instantiation issue when Hibernate is used as the Persistence layer. So it will stay there. Fixed. . v. Can I ask you to add a link to changeset with the fix to this issue, please? Thanks. Integrated into 'main-golden', will be available in build *200901140201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/c92d35a5eab3 User: Ayub Khan <ayubskhan@netbeans.org> Log: Fix issue#155640 - Entities are generated multiple times in RESTful web services fix backported into release65_fixes branch http://hg.netbeans.org/release65_fixes/rev/9148e08f62c5 |