facebook

problem generating JPA entities from tables..

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #290444 Reply

    Rick
    Member

    When I try to create JPA Entity classes and daos, from my database model using myeclipse, I get the following error:

    An internal error occurred during: “Generating Artifacts”.
    Foreign key name (0) mapped to different tables! previous: org.hibernate.mapping.Table(NPP_GUI.dbo.AttributeAttributeValue) current:org.hibernate.mapping.Table(NPP_GUI.dbo.AttributeGroupAttribute)

    Is there a way around this? I can manually code the relationships fine, but would like to use myeclipse to help.

    #290460 Reply

    Loyal Water
    Member

    Something seems wrong with the way you have defined the foreign keys for your tables. If you try to generate JPA entities from simple tables does it work without issues?

    #290461 Reply

    Rick
    Member

    I’ll have to try against some tables in a different db just to see. What is interesting is that I just tried it in NetBeans6 and it managed to create al the entities with no problems, so somehow I’d think it ‘should’ work. Not saying NB is better or anything, just stating that I’d think it should work and these tables have been used forever in existing applications. I’ll try to investigate some more what the issue might be.

    #290529 Reply

    Loyal Water
    Member

    rickcr,
    Can you paste the DDL here for me so that I can try reproducing this issue at my end as well.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: problem generating JPA entities from tables..

You must be logged in to post in the forum log in