Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Customizing schema generation
Customizing schema generation [message #1066091] Sun, 30 June 2013 10:13 Go to next message
dan pomerchik is currently offline dan pomerchikFriend
Messages: 5
Registered: June 2013
Junior Member
Hi,

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.

[Updated on: Mon, 01 July 2013 09:51]

Report message to a moderator

Re: Customizing schema generation [message #1066122 is a reply to message #1066091] Mon, 01 July 2013 06:14 Go to previous messageGo to next message
J LM is currently offline J LMFriend
Messages: 11
Registered: December 2012
Junior Member
Hi,
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.
Re: Customizing schema generation [message #1066128 is a reply to message #1066122] Mon, 01 July 2013 07:37 Go to previous messageGo to next message
dan pomerchik is currently offline dan pomerchikFriend
Messages: 5
Registered: June 2013
Junior Member
Im planning to modify to schema to create my custom DDL script in one phase (maybe during build). Then we would run the script but leave the schema as is.
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)
Re: Customizing schema generation [message #1067191 is a reply to message #1066128] Sun, 07 July 2013 12:48 Go to previous message
dan pomerchik is currently offline dan pomerchikFriend
Messages: 5
Registered: June 2013
Junior Member
anyone?
Previous Topic:MOXy: Insert/Replacement scenario using Xpath
Next Topic:Customizing schema generation
Goto Forum:
  


Current Time: Tue Mar 19 04:56:25 GMT 2024

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

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

Back to the top