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: | Column names order when creating a table | ||
---|---|---|---|
Product: | javaee | Reporter: | yohan_fernando |
Component: | Persistence | Assignee: | Sergey Petrov <sj-nb> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.0 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
yohan_fernando
2011-06-09 09:31:56 UTC
If it's an issue it may be an issue in eclipselink(or whatever provider you use), and may be some change between previous version and current one(2.2). Provider is responsible for db manipulations (tale creation/persist data etc.). You may want to ask a question or file an issue against eclipselink. I think it's a problem with eclipselink as well, or how netbeans assign the weigth for each field. I found a workaround by implementing a Descriptor customizer and assigning weight to each field in the sequence they should appear. See below, if any one strolls upon this. package xxxxx; import org.eclipse.persistence.config.DescriptorCustomizer; import org.eclipse.persistence.descriptors.ClassDescriptor; public class MyCustomiser implements DescriptorCustomizer { @Override public void customize(ClassDescriptor descriptor) { descriptor.setShouldOrderMappings(true); descriptor.getMappingForAttributeName("Id").setWeight(1); descriptor.getMappingForAttributeName("CustName").setWeight(2); descriptor.getMappingForAttributeName("Address").setWeight(3); descriptor.getMappingForAttributeName("Tel").setWeight(4); descriptor.getMappingForAttributeName("lastUpdatedOn").setWeight(5); } } thanks, there was no weight support on nb side before, but it may be good to add this support and allow to configure somehow in creation wizards, but it's some enhancement may need to be planned for later. it still may have sense to ask in eclipsleink news group or other eclipselink place also or file an issue as it seems reasonable to use old approach by default. 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 |