Home » SQL & PL/SQL » Client Tools » Turning Off "Generate DDL" In Data Modeler (SQL Developer Data Modeler, V4)
icon5.gif  Turning Off "Generate DDL" In Data Modeler [message #652339] Tue, 07 June 2016 10:18 Go to next message
BillKoster
Messages: 7
Registered: June 2016
Location: Silver Spring, MD
Junior Member
I've created a custom transformation that creates a template table with the standard who-and-when columns. Unlike most tables, though, I don't want this table engineered to the logical model, and I certainly don't want its DDL generated. A snippet of the code involved is:

nTable = model.getTableSet().createTable("");
nTable.setName( "TABLE_TEMPLATE" );
nTable.setDirty( true );
nTable.setShouldEngineer( false );
nTable.setShouldGenerateScript( false );
nTable.setCommentInRDBMS( "identifies the standard columns to be defined in each table" );

This works just fine, except that the option to generate DDL is not cleared. Does anyone know how to do this from within the script? Yes, I know it can be done interactively.
Re: Turning Off "Generate DDL" In Data Modeler [message #652347 is a reply to message #652339] Tue, 07 June 2016 11:27 Go to previous messageGo to next message
Frank Naude
Messages: 4531
Registered: April 1998
Senior Member
I assume you are referring to the setShouldGenerateScript part?
Is it simply ignored or what's the problem with it?
Re: Turning Off "Generate DDL" In Data Modeler [message #652360 is a reply to message #652347] Tue, 07 June 2016 14:06 Go to previous messageGo to next message
BillKoster
Messages: 7
Registered: June 2016
Location: Silver Spring, MD
Junior Member
Yes, I am referring to the setShouldGenerateScript statement. I get no error, it just seems to be ignored. Or, it's clearing some other option completely.
Re: Turning Off "Generate DDL" In Data Modeler [message #652400 is a reply to message #652360] Wed, 08 June 2016 03:29 Go to previous messageGo to next message
Frank Naude
Messages: 4531
Registered: April 1998
Senior Member
Do you get an error if you change setShouldGenerateScript to something like setShouldGenerateScriptX?

Are these statements documented, I've tried to search for more info, but didn't get much.
Re: Turning Off "Generate DDL" In Data Modeler [message #652470 is a reply to message #652400] Thu, 09 June 2016 10:27 Go to previous messageGo to next message
BillKoster
Messages: 7
Registered: June 2016
Location: Silver Spring, MD
Junior Member
If I give it the name of an invalid method, it DOES give me an error ("... has no such function "setShouldGenerateScriptX" in ...").

The various methods available are documented in the XML files in C:\SQL Developer\sqldeveloper-4.0.3.16\sqldeveloper\extensions\oracle.datamodeler\xmlmetadata\doc\index.html. Note that your path might differ slightly. Locate, for example, the Table entry. If you're looking for functionality at the "table" level and you can't find it there, you'd follow the Parent class (ContainerWithKeyObject) and so on up the hierarchy and/or follow the various Subclasses down their hierarchies until, hopefully, you find a method that you think will work.

What throws me is that the setShouldGenerateScript option is identified at the MultiShapedDesignObject level as well as the Table level.

There are some examples on the web in which references to some of these design methods can be found, but I haven't seen one for this.
Re: Turning Off "Generate DDL" In Data Modeler [message #652505 is a reply to message #652470] Fri, 10 June 2016 11:51 Go to previous messageGo to next message
BillKoster
Messages: 7
Registered: June 2016
Location: Silver Spring, MD
Junior Member
I had used Kris Rice's blog as the source for some transformation code, but I haven't been able to find a way to ask him a question.
Re: Turning Off "Generate DDL" In Data Modeler [message #652529 is a reply to message #652505] Sun, 12 June 2016 11:37 Go to previous messageGo to next message
thatjeffsmith
Messages: 71
Registered: July 2009
Location: Raleigh, NC
Member

you found his blog - leave a question on his blog as a comment

or he's @krisrice on Twitter

you can guess what his email address is @oracle.com

Or, you can post your question to our Data Modeler forum on OTN - the data modeling developers monitor that site and are happy to help people with their transformation scripts
Re: Turning Off "Generate DDL" In Data Modeler [message #652549 is a reply to message #652529] Mon, 13 June 2016 06:17 Go to previous messageGo to next message
BillKoster
Messages: 7
Registered: June 2016
Location: Silver Spring, MD
Junior Member
Yes, I'm trying to get my email address in OTN changed ... but they don't seem to be responding. It's been a week.
Re: Turning Off "Generate DDL" In Data Modeler [message #652553 is a reply to message #652549] Mon, 13 June 2016 09:13 Go to previous message
BillKoster
Messages: 7
Registered: June 2016
Location: Silver Spring, MD
Junior Member
Apparently the name of the method that should be used is setMarkedGenerate. In my code extract, the statement should be nTable.setMarkedGenerate( false );


I have reported to OTN that this method is not mentioned in the XML documentation.
Previous Topic: Installing example Schemas v2...Help
Next Topic: SQL Developer
Goto Forum:
  


Current Time: Fri Nov 24 12:44:37 CST 2017

Total time taken to generate the page: 0.02832 seconds