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.
When a Serializabe entity class is generated it should contain a private static final long serialVersionUID = 1L; and there should also be a hint offering to create it if it doesn't exist. The hint should be probably provided by the Java infrastructure, not by the j2ee/verification module. See also issue 79556.
Implemented the generation part for the New Entity Wizard. Needs to be implemented also for the ECs from DB wizard (I'll do that) and then the support part needs to done as well. Tomasz, could you have a look at the latter? I'll pass you this issue once the generation part is fully implemented. Checking in EntityWizard.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/entity/ EntityWizard.java,v <-- EntityWizard.java new revision: 1.15; previous revision: 1.14 done
*** Issue 114867 has been marked as a duplicate of this issue. ***
In fact there should be an option which allows you to specify if an entity class implements Serializable at all - Serializable isn't necessary for JPA entity classes.
I added the generation of the field to the Entities from DB wizard. I reopened issue 79556, we'll have to see whether it will be accepted. If not, Tomasz, could you have a look whether implementing the hint in j2ee/verification would make sense? Making the generation of the field (and implementing Serializable) optional needs to be handled in a separate issue. Checking in src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGenerator.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGenerator.java,v <-- JavaPersistenceGenerator.java new revision: 1.22; previous revision: 1.21 done Checking in test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/ testGenerateTwoUnrelated/User.pass; /cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/ JavaPersistenceGeneratorTest/testGenerateTwoUnrelated/User.pass,v <-- User.pass new revision: 1.8; previous revision: 1.7 done Checking in test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/ testGenerateTwoUnrelated/Product.pass; /cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/ JavaPersistenceGeneratorTest/testGenerateTwoUnrelated/Product.pass,v <-- Product.pass new revision: 1.8; previous revision: 1.7 done Checking in test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/ testGenerateOneEntity/User.pass; /cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/ JavaPersistenceGeneratorTest/testGenerateOneEntity/User.pass,v <-- User.pass new revision: 1.6; previous revision: 1.5 done Checking in test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/ testGenerateEntityFromSampleSchema/Customer.pass; /cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/ JavaPersistenceGeneratorTest/testGenerateEntityFromSampleSchema/Customer.pass,v <-- Customer.pass new revision: 1.6; previous revision: 1.5 done Checking in test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/ testGenerateRelatedEntitiesFromSampleSchema/ProductCode.pass; /cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/ JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/ProductCode.pass,v <-- ProductCode.pass new revision: 1.6; previous revision: 1.5 done Checking in test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/ testGenerateRelatedEntitiesFromSampleSchema/Product.pass; /cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/ JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/Product.pass,v <-- Product.pass new revision: 1.6; previous revision: 1.5 done Checking in test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/ testGenerateRelatedEntitiesFromSampleSchema/Manufacturer.pass; /cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/ JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/Manufacturer.pass,v <-- Manufacturer.pass new revision: 1.6; previous revision: 1.5 done
Taking over.
*** Issue 118255 has been marked as a duplicate of this issue. ***
isn't this a dupe of issue 70746?
fommil: yes, it is, thanks. *** This issue has been marked as a duplicate of 70746 ***