Hi;
On an ejb entity where vp automatically creates a PK class, it does not gen the appropiate code for such a class. Namely, implement Serializable and implement hashcode and equeals.
But I think that it did do it once. So, I wonder…
This ejb diagram was from an automatic sync to a entity diagram that was reverse genned from a MySQL database. (Just 4 tables in the schema.)
Thank you for your message. Could you mind tell me more detail about “does not gen the appropriate code”? Do you mean the PK class only contains the 2 auto implemented methods but didn’t contains any attributes? Although the PK class is automatically generated, you can still create it in the diagram by selecting the class and drag out the key icon. After creating the PK class in the diagram, you can add attributes to it and those attributes will be generated into the source file of the PK class.
Please feel free to contact us if you have any further questions.
package abc.xyz
public class AnyPK {
private String WrongCapitalizedString;
private String ThisShouldBePublicString;
}
That’s it. Nothing more than the fields.
From where do I drag the key? (If I want to recreate it.)
Thanks
-nat
ps. It should also have a constructor with the key fields as parameters. (In addition to the other methods.)
If I do it via the drag-key method, unlike the ejb wizard, it does declare the attributes public.
But, thats all it does. Nothing else in the class.
Now, I am almost sure that I did see vp gen a primiary key class correctly with the methods and implement Serializable. If I would know how, I wouldn’t complain.
Thanks
-nat
We are sorry that our engineers were not able to reproduce your problem. Could you mind give me more information about it? For example, sample projects/schema, screenshots, etc. Or anything that can help us to reproduce the problem would be useful. Thanks in advance!