Your Internet Explorer version is not compatible with our shopping cart system. Please use version 9 or higher to avoid problems with your order(s). Close
How do I generate the mapping files for two tables that have a one to many or a one to one relationship (i.e., user_account table and address table)? ❓
Select tables in Db Browser, right click and call ‘Generate Hibernate wizard’ – follow wizard and you will have mapping with correct relations (your tables have to have PK and FK)
Tried that and it didn’t work. What do you mean by PK? Primary Key? I setup the user_account table with an identity Id primary and the address table with the user_account.id as a foreign key. The I changed it and made the user_account.id the primary key in the address table. None of this worked.
As snpe stated above, If there is a relationship expressed in the database model, we will pick it up. Make sure you select both tables before invoking reverse engineering.
Also, could you please qualify what you mean by “didn’t work”. Are any files being generated at all? Are the files being generated but missing the relationships or you see an error and nothing is generated?
If you are using a version of MyEclipse prior to 4.1.1, on Page 2 of the RE wizard -make sure “generate basic typed composite ids” is checked. I would suggest upgrading to 4.1.1 for a better experience.
Please answer all the questions here: Posting Guidelines to help us resolve your issue quickly.