I was very disappointed when I found I couldn't add a SQL View to my Data Model because it isn't an entity. Views return entities, and a real part of any data model I have ever worked with. Having to drop out of model driven development to work with views reduces the value of LCDS as it limits applications to simple CRUD ooperations. Oh well.
Views
Replies
Total Likes
If you have views defined in your database, you should be able to import them to your model. Once imported, they will be represented as entities in your model. Is this what you are trying to do?
Thanks,
Anil
Product Manager, LiveCycle Data Services
Views
Replies
Total Likes
Yes I can drag and drop the view into the model, but when I try to
deploy the model I throws an error and says it cannot deploy because
the view is not an entity.
I found that mucking with the model source and setting president =
true and changing one of the properties to an id fakes it into
thinking it's a table and gatAll() gives me what I want.
But I shouldn't have to do that IMHO the model should handle views
automatically.
Ollie
Sent from my iPhone
Views
Replies
Total Likes
An id (primary key) must be defined in order to create a persistant entity. An entity must be persistant
to work with datamanagement. Similarly a view must use a pk/id in order to work with datamanagement. If
the view has a pk defined, it will work by the drag and drop.
So, put the id in your view or modify the datamodel.
KenS
Views
Replies
Total Likes
Mike, I checked with some folks internally and they tell me that this should work as long as views have a primary key. If they do, fiber treats views as entities and the drag and drop feature should just work.
Anil
Views
Replies
Total Likes
Thanks, good clear response.
Michael Oliver
CTO, Corent Technology Inc.
<http://www.corenttechnology.com>
Mobile: +63-917-557-0990 *New!
Office: +1(951) 260-0793
Home: +1(951) 263-6601
Skype: MikeOliverAZ
Choice vs. Force
<http://www.facebook.com/MikeOliverAZ><http://twitter.com/#%21/MikeOliverAZ><http://www.linkedin.com/pub/mike-oliver/0/1b9/197>
See my Cloudbook
profile.<http://cloudbook.net/community/contributors/michael-oliver
Views
Replies
Total Likes
Great thanks,
Michael Oliver
CTO, Corent Technology Inc.
<http://www.corenttechnology.com>
Mobile: +63-917-557-0990 *New!
Office: +1(951) 260-0793
Home: +1(951) 263-6601
Skype: MikeOliverAZ
Choice vs. Force
<http://www.facebook.com/MikeOliverAZ><http://twitter.com/#%21/MikeOliverAZ><http://www.linkedin.com/pub/mike-oliver/0/1b9/197>
See my Cloudbook
profile.<http://cloudbook.net/community/contributors/michael-oliver
Views
Replies
Total Likes
When I drag such a view to my model in Flash Builder 4, although it places it on the model but also throws an error whose details from the error log are as follows :--
Message = Problems occurred when invoking code from plug-in: "org.eclipse.jface".
Session Data =
eclipse.buildId=unknown
java.version=1.6.0_16
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86
Exception Stack Trace =
java.lang.IndexOutOfBoundsException: Index: 14, Size: 3
at java.util.ArrayList.add(Unknown Source)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.primAddSourceConnection(AbstractGraphicalEditPart.java:525)
at org.eclipse.gef.editparts.AbstractGraphicalEditPart.addSourceConnection(AbstractGraphicalEditPart.java:246)
at com.adobe.model.design.editor.parts.EclipsePropertyAwarePart.handleOutputChange(EclipsePropertyAwarePart.java:206)
at com.adobe.model.design.editor.parts.EclipsePropertyAwarePart.propertyChange(EclipsePropertyAwarePart.java:86)
at com.adobe.model.design.editor.parts.FiberEntityPart.propertyChange(FiberEntityPart.java:587)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at com.adobe.model.design.editor.model.EclipsePropertyAwareObject.firePropertyChange(EclipsePropertyAwareObject.java:93)
at com.adobe.model.design.editor.model.FiberEntity.addChildRelationship(FiberEntity.java:175)
at com.adobe.model.design.editor.model.FiberEntity.addChildRelationship(FiberEntity.java:161)
at com.adobe.model.design.editor.parts.FiberModelPart.updateRelationships(FiberModelPart.java:581)
at com.adobe.model.design.editor.parts.FiberModelPart.updateRelationships(FiberModelPart.java:439)
at com.adobe.model.design.editor.parts.FiberModelPart.updateRelationships(FiberModelPart.java:308)
at com.adobe.model.design.editor.parts.FiberModelPart.updateRelationships(FiberModelPart.java:275)
at com.adobe.model.design.editor.parts.FiberModelPart.propertyChange(FiberModelPart.java:173)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at com.adobe.model.design.editor.model.EclipsePropertyAwareObject.firePropertyChange(EclipsePropertyAwareObject.java:93)
at com.adobe.model.design.editor.model.FiberModel.addEntity(FiberModel.java:143)
at com.adobe.model.design.editor.model.FiberModel.addEntity(FiberModel.java:102)
at com.adobe.model.design.editor.commands.EntityCreateCommand.redo(EntityCreateCommand.java:121)
at com.adobe.model.design.editor.commands.EntityCreateCommand.execute(EntityCreateCommand.java:113)
at com.adobe.model.design.editor.commands.FiberCommandStack.execute(FiberCommandStack.java:298)
at org.eclipse.gef.dnd.AbstractTransferDropTargetListener.handleDrop(AbstractTransferDropTargetListener.java:314)
at org.eclipse.gef.dnd.TemplateTransferDropTargetListener.handleDrop(TemplateTransferDropTargetListener.java:101)
at com.adobe.model.design.editor.FiberDesignEditor$2.handleDrop(FiberDesignEditor.java:335)
at org.eclipse.gef.dnd.AbstractTransferDropTargetListener.drop(AbstractTransferDropTargetListener.java:171)
at org.eclipse.jface.util.DelegatingDropAdapter$3.run(DelegatingDropAdapter.java:211)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:888)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:48)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
at org.eclipse.jface.util.DelegatingDropAdapter.drop(DelegatingDropAdapter.java:209)
at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1027)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1012)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:770)
at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:456)
at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:258)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:119)
at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method)
at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:363)
at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:289)
at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:172)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.adobe.flexbuilder.standalone.FlexBuilderApplication.start(FlexBuilderApplication.java:109)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Views
Replies
Total Likes