Re: EOModeler Flatten relationship bug

From: Mike Schrag (mschra..dimension.com)
Date: Mon Jul 17 2006 - 13:18:48 EDT

  • Next message: Mike Schrag: "Re: EOModel Editor: Issue loading the fetchSpec: Unknown class NSNumber"

    The loop that was created is because I accidentally used the NAME as
    the definition -- as you can imagine, that means that it's a
    flattened relationship pointing to itself. Eek. Try again.

    I'm also getting toMany passing through to the flattened relationship
    properly. By the way, that toMany bug is only a view problem, since
    toMany on a flattened relationship doesn't (or shouldn't) actually
    write to the file anyway.

    ms

    On Jul 17, 2006, at 12:08 PM, Pierre Frisch wrote:

    > I think I cried victory too quickly. With the latest committed
    > sources (2829), with a existing fatten relationship the cardinality
    > is still wrong i.e. it is a toMany but it is shown as a toOne. If I
    > delete that relationship and try to recreate it I get a loop. This
    > is nothing special fatten relationship part of a ManyToMany with
    > nothing special. The model is broken and I have to restore it from
    > backup.
    >
    > Thanks
    >
    > Pierre
    >
    > The EOmodeler version is:
    > {
    > definition = "publicationUserPreferencess.publication";
    > joinSemantic = EOInnerJoin;
    > name = publications;
    > }
    > Our version is
    > {
    > definition = publicationUserPreferencess_publication;
    > name = publicationUserPreferencess_publication;
    > }
    > The reference relationship to the join table is:
    > {
    > joinSemantic = EOInnerJoin;
    > destination = UserPreferencesPublication;
    > deleteRule = EODeleteRuleCascade;
    > joins =
    > (
    >
    > {
    > destinationAttribute = oidUserPreferences;
    > sourceAttribute = oid;
    > }
    > );
    > isToMany = Y;
    > name = publicationUserPreferencess;
    > propagatesPrimaryKey = Y;
    > }
    >
    >
    > !ENTRY org.eclipse.ui 4 4 2006-07-17 17:56:02.068
    > !MESSAGE Unhandled event loop exception
    >
    > !ENTRY org.eclipse.ui 4 0 2006-07-17 17:56:02.098
    > !MESSAGE java.lang.NullPointerException
    > !STACK 0
    > java.lang.NullPointerException
    > at
    > org.objectstyle.wolips.eomodeler.model.EORelationshipPath.getChildren(
    > EORelationshipPath.java:67)
    > at
    > org.objectstyle.wolips.eomodeler.outline.EOModelOutlineContentProvider
    > .getChildren(EOModelOutlineContentProvider.java:91)
    > at org.eclipse.jface.viewers.AbstractTreeViewer.getRawChildren
    > (AbstractTreeViewer.java:1157)
    > at org.eclipse.jface.viewers.TreeViewer.getRawChildren
    > (TreeViewer.java:768)
    > at org.eclipse.jface.viewers.AbstractTreeViewer.getFilteredChildren
    > (AbstractTreeViewer.java:565)
    > at org.eclipse.jface.viewers.AbstractTreeViewer.getSortedChildren
    > (AbstractTreeViewer.java:534)
    > at org.eclipse.jface.viewers.AbstractTreeViewer$1.run
    > (AbstractTreeViewer.java:719)
    > at org.eclipse.swt.custom.BusyIndicator.showWhile
    > (BusyIndicator.java:67)
    > at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren
    > (AbstractTreeViewer.java:696)
    > at org.eclipse.jface.viewers.TreeViewer.createChildren
    > (TreeViewer.java:892)
    > at org.eclipse.jface.viewers.AbstractTreeViewer.handleTreeExpand
    > (AbstractTreeViewer.java:1240)
    > at org.eclipse.jface.viewers.AbstractTreeViewer$4.treeExpanded
    > (AbstractTreeViewer.java:1252)
    > at org.eclipse.swt.widgets.TypedListener.handleEvent
    > (TypedListener.java:181)
    > at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
    > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1496)
    > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
    > at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1505)
    > at org.eclipse.swt.widgets.Tree.itemNotificationProc(Tree.java:2256)
    > at org.eclipse.swt.widgets.Display.itemNotificationProc
    > (Display.java:2254)
    > at org.eclipse.swt.internal.carbon.OS.CallNextEventHandler(Native
    > Method)
    > at org.eclipse.swt.widgets.Tree.kEventMouseDown(Tree.java:2334)
    > at org.eclipse.swt.widgets.Widget.mouseProc(Widget.java:1246)
    > at org.eclipse.swt.widgets.Display.mouseProc(Display.java:2771)
    > at org.eclipse.swt.internal.carbon.OS.SendEventToEventTarget
    > (Native Method)
    > at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2910)
    > at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:
    > 1914)
    > at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
    > at org.eclipse.ui.internal.Workbench.createAndRunWorkbench
    > (Workbench.java:419)
    > at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:
    > 149)
    > at org.eclipse.ui.internal.ide.IDEApplication.run
    > (IDEApplication.java:95)
    > at org.eclipse.core.internal.runtime.PlatformActivator$1.run
    > (PlatformActivator.java:78)
    > at
    > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplic
    > ation(EclipseAppLauncher.java:92)
    > at
    > org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start
    > (EclipseAppLauncher.java:68)
    > at org.eclipse.core.runtime.adaptor.EclipseStarter.run
    > (EclipseStarter.java:400)
    > at org.eclipse.core.runtime.adaptor.EclipseStarter.run
    > (EclipseStarter.java:177)
    > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    > at sun.reflect.NativeMethodAccessorImpl.invoke
    > (NativeMethodAccessorImpl.java:39)
    > at sun.reflect.DelegatingMethodAccessorImpl.invoke
    > (DelegatingMethodAccessorImpl.java:25)
    > at java.lang.reflect.Method.invoke(Method.java:585)
    > at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
    > at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
    > at org.eclipse.core.launcher.Main.run(Main.java:977)
    > at org.eclipse.core.launcher.Main.main(Main.java:952)
    >
    > !ENTRY org.eclipse.ui 4 4 2006-07-17 17:56:35.923
    > !MESSAGE Unhandled event loop exception
    >
    > !ENTRY org.eclipse.ui 4 0 2006-07-17 17:56:35.927
    > !MESSAGE java.lang.StackOverflowError
    > !STACK 0
    > java.lang.StackOverflowError
    > at java.lang.ThreadLocal.get(ThreadLocal.java:125)
    > at
    > org.eclipse.jface.internal.databinding.provisional.observable.Observab
    > leTracker.getterCalled(ObservableTracker.java:131)
    > at
    > org.eclipse.jface.internal.databinding.provisional.observable.list.Obs
    > ervableList$1.hasNext(ObservableList.java:159)
    > at
    > org.objectstyle.wolips.eomodeler.model.EOEntity.getAttributeNamed
    > (EOEntity.java:795)
    > at
    > org.objectstyle.wolips.eomodeler.model.EOEntity.getAttributeOrRelation
    > shipNamed(EOEntity.java:673)
    > at org.objectstyle.wolips.eomodeler.model.EOEntity.resolveKeyPath
    > (EOEntity.java:125)
    > at org.objectstyle.wolips.eomodeler.model.EORelationship.isToMany
    > (EORelationship.java:337)
    > at org.objectstyle.wolips.eomodeler.model.EORelationship.isToMany
    > (EORelationship.java:339)
    > at org.objectstyle.wolips.eomodeler.model.EORelationship.isToMany
    > (EORelationship.java:339)
    >
    >
    >
    >
    > On 17-Jul-06, at 5:26 PM, Pierre Frisch wrote:
    >
    >> I cannot reproduce it with the latest bug so consider it as
    >> closed. I will do more testing a bit later.
    >>
    >> Thanks
    >>
    >> Pierre
    >>
    >> On 17-Jul-06, at 4:41 PM, Mike Schrag wrote:
    >>
    >>> The cardinality thing is fixed now ... EOEntity can now resolve a
    >>> keypath down to an IEOAttribute (IEOAttribute resolveKeyPath
    >>> (String _keyPath)), and relationship isToMany returns the
    >>> isToMany value of its target if it is a flattened relationship.
    >>>
    >>> For the second problem, I haven't seen this (and couldn't
    >>> reproduce it in mine). Any time you get this error dialog, there
    >>> should be a corresponding stack trace in the Error Log view. Can
    >>> you send me the stack trace from that? The bottom exception of
    >>> that trace has the actual cause of that problem.
    >>>
    >>> Oh, and I also set new relationships to default to be class
    >>> relationships now.
    >>>
    >>> ms
    >>>
    >>> On Jul 17, 2006, at 6:35 AM, Pierre Frisch wrote:
    >>>
    >>>> Hi Mike,
    >>>>
    >>>> I have found a few bugs.
    >>>>
    >>>> There is a problem with the cardinality of flatten relationship.
    >>>> The cardinality should be calculated based on the definition of
    >>>> the relationship at the moment it is not. This quite a bit of
    >>>> work as we need to explore the definition path to rebuild each
    >>>> relationship and determine if it is a toMany.
    >>>>
    >>>> The other problem is the class property Boolean it is not set by
    >>>> default as it should be and when I try to set it manually I get
    >>>> an error:
    >>>> <Picture 1.png>
    >>>>
    >>>> Thanks
    >>>>
    >>>> Pierre
    >>>
    >>>
    >>
    >>
    >



    This archive was generated by hypermail 2.0.0 : Mon Jul 17 2006 - 13:18:53 EDT