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.

Bug 226428 - "Entity classes from database" toString should be compliant with "Alt+Insert...toString..."
Summary: "Entity classes from database" toString should be compliant with "Alt+Insert....
Status: RESOLVED WONTFIX
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Sergey Petrov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-20 23:53 UTC by ecerichter
Modified: 2016-07-07 08:54 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ecerichter 2013-02-20 23:53:26 UTC
Product Version = NetBeans IDE Dev (Build 201302172300)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_13
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.7-b01

When running the "Entity classes from database", generated toString method should be compliant to "Alt+Insert...toString...":

Example of persistent generated toString:

  @Override
  public String toString() {
    return "br.net.studi.beans.RelatorioParametro[ relatorioParametroPK=" + relatorioParametroPK + " ]";
  }

Example of Alt+Insert generated toString:

  @Override
  public String toString() {
    return "RelatorioParametro{" + "relatorioParametroPK=" + relatorioParametroPK + '}';
  }
Comment 1 Sergey Petrov 2013-03-25 10:25:04 UTC
why it's required?
I see nothing specific to persistence(in provided example), but in my opinion persistence may generate some special toString to reflect some jpa specific features and in this case it may be even completely different(I need to check if it's already done this way in some use-cases).
Comment 2 ecerichter 2013-03-25 10:47:57 UTC
Changing to enhancement.

The point is that during code review, some developers use the toString from the "Entities from database", others use the Alt+Insert, leading to different coding even using same toolset - package name instead class name alone, square brackets [ instead brackets {, etc.

It is not a radical change, just conformance to make coding more standardized.


Thanks,

Edson
Comment 3 Martin Balin 2016-07-07 08:54:23 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss