Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [teneo] primary key in java code
[teneo] primary key in java code [message #606937] Wed, 13 June 2007 16:44
Paul Gardiner is currently offline Paul GardinerFriend
Messages: 94
Registered: July 2009
Member
This has likely been answered, but I can't seem to find it.

I am unsure how to set a primary key using annotations in the java source --
not in an external xml file. I tried something like this

/**
* @model
*/
public interface A {
/**
* @model changeable="false"
*/
@Id
String getUniqueName();
}

Then I create a genmodel/ecore model from the code, generate the model, and
the uniquename property doesn't end up as the primary key. It's set to
changeable="false" because I am creating the value from other data, and that
gets stored find in the database.

Thanks,
Paul
Previous Topic:Issue with JPA Annotations
Next Topic:[teneo] primary key in java code
Goto Forum:
  


Current Time: Sun Nov 27 17:07:11 GMT 2022

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

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

Back to the top