Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Model String as Foreign key constraint
Model String as Foreign key constraint [message #718294] Tue, 23 August 2011 21:18
Jonathan  is currently offline Jonathan Friend
Messages: 6
Registered: August 2011
Junior Member
I've run into an issue where we are updating an existing JPA project while needing to maintain backwards support. I have a relationship table that models a relationship from entity A to entity B.

The relationship table has a from and to id that are represented as strings and previously all the one to one mapping for each entity was managed through application code rather than in the entity using the proper annotations.

The previous application clients need to retain the ability to write JPQL statements to these string fields. I was wondering if there was any way to in place convert these to enforcing one to one mapping via a foreign key constraint since JPA normally requires the entity rather than using a string key.

Thanks in advance! Please let me know if more explanation is required.
Previous Topic:Do I really need 24 message queues, message receiver classes, message sender classes?
Next Topic:(no subject)
Goto Forum:
  


Current Time: Wed Apr 24 17:55:35 GMT 2024

Powered by FUDForum. Page generated in 0.02749 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top