On Wed, 13 Apr 2005 23:12:53 +0200, snpe <[EMAIL PROTECTED]> wrote:
Hello, yes, i want limit metadata and I wait for your changes
ok.
Question 1: Can I limit dependencies (many-to-one,one-to-many) in JDBCBinder ? for example
check box in Artifact wizard : Want you make one-to-many ?
If no then we doesn't make imported keys (jdbc concept for another side of foreign key)
and like for many-to-one and foreign key/exported key
disabling one-to-many is a ok feature, but we still need to get the foreignkeys
to do one-to-many so i don't see how this can be avoided ?
Question 2:
Do you want link to patched sqlexplorer (2-3 mb) or that I make this with webtools M4 ?
I can't compile mapper plugin with current webtools, but i needn't mapper for this stuff
I'll look at syncing up with the latest webtools.
-max
regards Haris Peco On Wednesday 13 April 2005 05:22 pm, Max Rydahl Andersen wrote:On Wed, 13 Apr 2005 19:26:47 +0200, snpe <[EMAIL PROTECTED]> wrote:
Looks great what you are doing.
If I understand you correctly this stuff simply just get some names from the Data Explorer to limit what metadata our rev.eng. will get, correct ?
If that is the case then if you wait a day or two you'll see stuff happening that should make this much easier for you.
I've just added the filter method you are referring too together with
a very flexible way of filtering tables - only possible in code at first,
but i'll expose it in the ui too.
/max
> Hello,
> I try integrate any database explorer and hibernate tools
> I want, for example, that choose object (table,views ) from explorer
> and call hibernate reverse engineering wizard.
> I use sqlexplorer (patched), but I will try webtools when M4 be out
> (April 22)
>
> I have any request from tools
>
> 1) I need new method (or replace current) in JDBCFilter :
>
> boolean acceptTableName(String catalogName,String schemaName,String
> tableName);
>
> and call to this method when/except call acceptTableName(String name)
>
> I export extension point in sqlexplorer and define popupMenu like this
> (I add in org.hibernate.eclipse.console plugin;TableNode class is from
> sqlexplorer)
> ...
> <extension
> point="org.eclipse.ui.popupMenus">
> <objectContribution
> objectClass="net.java.sqlexplorer.dbviewer.model.TableNode"
> id="net.java.sqlexplorer.hibernate.wizard">
> <action
> label="Hibernate Artifact Generator Wizard"
> class="org.hibernate.reveng.ArtifactGeneratorAction"
> menubarPath="additions"
> id="net.java.sqlexplorer.hibernate.item">
> </action>
> </objectContribution>
> </extension>
> ...
> ArtifactGeneratorAction call ArtifactGeneratorWizard like this :
> ...
> public void run() {
> wizard = new ArtifactGeneratorWizard();
> IWorkbench workbench = PlatformUI.getWorkbench();
> wizard.init(workbench, (IStructuredSelection) selection);
> dialog = new WizardDialog(workbench.getActiveWorkbenchWindow()
> .getShell(), wizard);
> dialog.open();
> }
> ...
>
> this is screenshoot http://www.snpe.co.yu/artifactwizard.png
>
> Hibernate Artifact Generator Wizard call ArtifactGeneratorWizard from
> console plugin with next change
> (line 244 change is only JDBCFilter#acceptTableName):
>
> public Object execute() {
> cfg.readFromJDBC(new JDBCFilter() {
> public boolean acceptTableName(String name) {
> if (selection == null
> || !(selection instanceof IStructuredSelection))
> return !name.startsWith("BIN$"); // oracle hack
> else {
> IStructuredSelection structuredSelection = (IStructuredSelection)
> selection;
> for (Iterator iter = structuredSelection
> .iterator(); iter.hasNext();) {
> Object object = iter.next();
> String tableName = null;
> String schemaName = null;
> String catalogName = null;
> if (object instanceof TableNode) {
> TableNode node = (TableNode) object;
> tableName = node.getTableInfo()
> .getSimpleName();
> schemaName = node
> .getTableInfo()
> .getSchemaName();
> catalogName = node
> .getTableInfo()
> .getCatalogName();
> }
> // I want check tableName,schemaName and catalogName,
> // but JDBCFilter need new method
> if (name.equals(tableName))
> return true;
> }
> }
> return false;
> }
> });
>
>
> Problem is yet with dependencies (for example, when I get table A with
> foreign key to B
> I get exceptions, because JDBCBinder work with complete schema)
> I can find all dependencies (exported and imported key table) and return
> true in JDBCFilter#acceptTableName
> for dependencies table - with this we haven't to change JDBCBinder or
> add checkBox in ArtifactGeneratorWizard for generate or not
> many-to-one,one-to many etc - Can JDBCBinder
> skip generate collection (one-to-many,many-to-one ...) ?
>
> I can set patched sqlexplorer if You want try this (It work with eclipse
> 3.1M6,last cvs hibernate and hibernate tools)
> Comments ?
>
> Haris Peco
-- -- Max Rydahl Andersen callto://max.rydahl.andersen
Hibernate [EMAIL PROTECTED] http://hibernate.org
JBoss Inc [EMAIL PROTECTED] http://jboss.com
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ hibernate-devel mailing list hibernate-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/hibernate-devel