Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsCustomizing schema generation
https://www.eclipse.org/forums/index.php/mv/msg/489719/1066091/#msg_1066091
We are using eclipse link to generate our tables.
We need to add special columns to our tables, which are not a part of the entity (we have created our own CVS system, and we store more info about the CVS in those columns)
currenty, we let EL create our database and afterwards we run a script that adds our custom fields and create views and more. I would like to integrate somehow into EL code and manipulate the tables it creates.
I've reached a situation when i am able to add a field and change the table name. (im doing it using sessionEvent on preLogin.) however it works only for the 'main' table. E.g. if it's a collection table, for some reason it adds beside my column an ID column as well... - for example, i have my base class that defines a UUID field as my ID.
my object has another field, a collection of UUIDs. When that table is created, i get another objId field in the collection table..
Attached my code. (its a screenshot because my work blocks posting code.. :/) I hope you understand my question.. thanks.]]>dan pomerchik2013-06-30T10:13:22-00:00Re: Customizing schema generation
https://www.eclipse.org/forums/index.php/mv/msg/489719/1066122/#msg_1066122
why do you add columns at the mappings level ? IMHO it means that you add a column for the descriptor of the table and for each relation to this table.
It seems to me risky to add columns at the desc if you don't want your entities to use those fields. Some side effects could happen.]]>J LM2013-07-01T06:14:56-00:00Re: Customizing schema generation
https://www.eclipse.org/forums/index.php/mv/msg/489719/1066128/#msg_1066128
The problem is when i add the column to the collection table, i get another unwanted field as well.. (objId, which is the @ID of the containing class)]]>dan pomerchik2013-07-01T07:37:32-00:00Re: Customizing schema generation
https://www.eclipse.org/forums/index.php/mv/msg/489719/1067191/#msg_1067191
dan pomerchik2013-07-07T12:48:40-00:00