FDS and Hibernate dynamic mapping

I am using FDS with hibernate
(flex.data.assemblers.HibernateAssembler) to transfer data between
the flex client and my JDBC database. This works really smooth, as
long as I specify a server-side java class (POJO) in the
<hibernate-mapping><class name="some.class"> attribute.
As I dont really need these server-side java classes for
anything else, I have tried to save some work by using the
hibernate "dynamic-map" mode (<hibernate-mapping><class
entity-name="some.entity">). But in this case, FDS does not map
the result to the corresponding flex ActionScript class with the
correct RemoteClass alias. The DataService "fill" method returns an
ArrayCollection of "ManagedObjectProxy" items containing the field
"$type$=some.entity" instead.
Does FDS support hibernate dynamic mapping? Is there a
workaround for this problem?
Best,
Per

Hi Per,
The Hibernate assembler doesn't currently support the
dynamic-map mode, so for now you'll need your POJOs.
Best,
Seth

Similar Messages

  • Parent Child Hierarchy with FDS and Hibernate

    I know my chances of getting heard here are slim, but I am at
    a dead end, so here goes.
    I have a four level hierarchy of objects
    PlanPoint
    ....UserScenario
    ........Scenario
    ............Competitor
    which have bi-directional one-to-many relationships between
    them.
    I have made sure that my hibernate mappings and FDS
    destination are matched and I definitely need to have managed
    associations as the graph of objects will grow large in my
    application (and besides, it is good development practice). So I
    have a fully formed project (or at least I think I do) and I get a
    duplicate object error.
    Right at the bottom I have an alternative that I have tried
    which gives a different error.
    Here is a snippet from my log... it picks up just after the
    message arrives
    2007-02-05 21:21:10,281 INFO [STDOUT] Hibernate: insert into
    COMPETITOR (COMPETITOR_ID, SCENARIO_ID, NAME, X, Y, RADIUS, ACTUAL,
    PROPOSITIONS, ORDER_SIZE, CONVERSION_RATE) values (null, ?, ?, ?,
    2007-02-05 21:21:10,281 INFO [STDOUT] Hibernate: call
    identity()
    2007-02-05 21:21:10,312 INFO [STDOUT] Hibernate: insert into
    SCENARIO (SCENARIO_ID, TITLE, SEQUENCE, POTENTIAL,
    USER_SCENARIO_ID) values (null, ?, ?, ?, ?)
    2007-02-05 21:21:10,312 INFO [STDOUT] Hibernate: call
    identity()
    2007-02-05 21:21:10,359 INFO [STDOUT] Hibernate: insert into
    USER_SCENARIO (USER_SCENARIO_ID, TITLE, PLANPOINT_ID, AUTHOR)
    values (null, ?, ?, ?)
    2007-02-05 21:21:10,359 INFO [STDOUT] Hibernate: call
    identity()
    2007-02-05 21:21:10,406 INFO [STDOUT] [Flex] Serializing
    AMF/RTMP response
    Version: 3
    (Command method=_error (0) trxId=8)
    (Typed Object #0 'flex.messaging.messages.ErrorMessage')
    rootCause = (Typed Object #1
    'org.hibernate.NonUniqueObjectException')
    throwables = (Array #2)
    [0] = (Ref #1)
    localizedMessage = "a different object with the same
    identifier value was already associated with the session:
    [pmco.pojos.Competitor#0]"
    message = "a different object with the same identifier value
    was already associated with the session: [pmco.pojos.Competitor#0]"
    identifier = 0
    cause = null
    throwableCount = 1
    entityName = "pmco.pojos.Competitor"
    messages = (Array #3)
    [0] = "a different object with the same identifier value was
    already associated with the session"
    destination = "competitor.hibernate"
    headers = (Object #4)
    correlationId = "BFAF11E0-6121-54BB-A836-93C81DAE7772"
    faultString = "Could not invoke sync method on data adapter
    for destination 'userscenario.hibernate' due to the following
    error: class org.hibernate.NonUniqueObjectException:a different
    object with the same identifier value was already associated with
    the session: [pmco.pojos.Competitor#0]."
    messageId = "78CB9396-9618-519F-8DB0-70D4E53357FE"
    faultCode = "Server.Processing"
    timeToLive = 0.0
    extendedData = null
    faultDetail = null
    clientId = null
    timestamp = 1.17071047039E12
    body = null
    Anyone got any ideas?
    I would provide my mappings and destinations but I can't fit
    them in a message

    Hi,
    thanks for the reply it was very helpful. I came to pretty
    much the same conclusion and started on the path of a re-write of
    the hibernate assembler myself. As far as I can tell the Hibernate
    Assembler is a Java Assembler, so there didn't seem much difference
    to me between fixing that one and writing another one. Adobe ship
    the code.
    Bit of a cheeky request, but I don't suppose you would be
    willing to share your assembler layer so I have a template against
    which to work? Biggest problem with this sort of activity is a lack
    of examples which makes it very slow going and largely trial and
    error.
    If you would like to know more about our application I will
    provide contact details so we can discuss.
    Simon
    PS Jeff Vroom posted a reply saying that the Adobe Hibernate
    Assembler didn't work properly with hierarchical data (which I
    imagine is every real application in the world), personally I think
    Adobe should fix it or pull it.
    http://tech.groups.yahoo.com/group/flexcoders/message/63961

  • Hibernate creating Dynamic Mapping File

    Hi All,
    I am supposed to create the Mapping Hbm file dynamically at run time. I learnt that this can be acheived from a Java class file using Xdoclets. But in my case i have to do it from a Xml File. Can this done by xdoclets or anything else?
    Parsing the xml file and creating the Mapping file would be a good Idea. Is there is any way?
    Thanks
    Aski

    See the First Xml File will have the Requirement Data, It will be on a bunch and it may reside on some other schema. And the Second Xml will be our Mapping Xml File which should be reside on Hibernate standards.
    So which will be the best way to transform from one file(xml) to other Xml File(Mapping.xml).
    Thanks

  • About how to build dynamic maps using jdeveloper 10g and mapviewer

    i follow the guidance (about how to build dynamic maps using jdeveloper 10g and oracle application server mapviewer) to write a jsp file,but error take palce ,i get information "Project: D:\jdev1012\jdev\mywork\WebMap\ViewController\ViewController.jpr
    D:\jdev1012\jdev\mywork\WebMap\ViewController\public_html\WebMap.jsp
    Error(12,37): cannot access class oracle.lbs.mapclient.taglib.MapViewerInitTag; file oracle\lbs\mapclient\taglib\MapViewerInitTag.class not found
    Error(12,190): cannot access class oracle.lbs.mapclient.taglib.MapViewerInitTag; file oracle\lbs\mapclient\taglib\MapViewerInitTag.class not found
    Error(12,102): cannot access class oracle.lbs.mapclient.taglib.MapViewerInitTag; file oracle\lbs\mapclient\taglib\MapViewerInitTag.class not found
    Error(12,28): cannot access class oracle.lbs.mapclient.MapViewer; file oracle\lbs\mapclient\MapViewer.class not found
    Error(12,40): cannot access class oracle.lbs.mapclient.MapViewer; file oracle\lbs\mapclient\MapViewer.class not found
    Error(13,37): cannot access class oracle.lbs.mapclient.taglib.MapViewerSetParamTag; file oracle\lbs\mapclient\taglib\MapViewerSetParamTag.class not found
    Error(13,198): cannot access class oracle.lbs.mapclient.taglib.MapViewerSetParamTag; file oracle\lbs\mapclient\taglib\MapViewerSetParamTag.class not found
    Error(13,106): cannot access class oracle.lbs.mapclient.taglib.MapViewerSetParamTag; file oracle\lbs\mapclient\taglib\MapViewerSetParamTag.class not found
    Error(14,37): cannot access class oracle.lbs.mapclient.taglib.MapViewerRunTag; file oracle\lbs\mapclient\taglib\MapViewerRunTag.class not found
    Error(14,188): cannot access class oracle.lbs.mapclient.taglib.MapViewerRunTag; file oracle\lbs\mapclient\taglib\MapViewerRunTag.class not found
    Error(14,101): cannot access class oracle.lbs.mapclient.taglib.MapViewerRunTag; file oracle\lbs\mapclient\taglib\MapViewerRunTag.class not found
    Error(15,37): cannot access class oracle.lbs.mapclient.taglib.MapViewerGetMapURLTag; file oracle\lbs\mapclient\taglib\MapViewerGetMapURLTag.class not found
    Error(15,200): cannot access class oracle.lbs.mapclient.taglib.MapViewerGetMapURLTag; file oracle\lbs\mapclient\taglib\MapViewerGetMapURLTag.class not found
    Error(15,107): cannot access class oracle.lbs.mapclient.taglib.MapViewerGetMapURLTag; file oracle\lbs\mapclient\taglib\MapViewerGetMapURLTag.class not found"
    can you help?
    greetings

    I found a lot of information in document 133682.1 on metalink.
    step by step example how to deploy a JSP business component application.

  • Dynamic mapping: I have no Class. I want to get database columns into a map

    I want to practice dynamic mapping.
    I don't know the class in development time. I know the attributes only on runtime. Then I create the table, and want to practice OR Mapping to get and set data in this table while all I have is aa map of fields (Strings/int for direct-to-field mappings, Lists, Objects, etc.) - against this new table.
    I have no Class. Neither source nor Class object in hand.
    In Hibernate it is possible and very well documented. It's called "Dynamic Model". I have to get a special Hib session from a session i already have, and it starts to work with Maps and not real classes and objects.
    Here is the command in Hib: sess.getSession(EntityMode.MAP);
    Thanks in advance.
    Doron

    Doron,
    We have been working with dynamic models and byte code weaving for a while now. I took some work I did a few months back now and upgraded it to work with EclipseLink JPA. I have started creating an example within EclipseLink to both illustrate how EclipseLink can be extended to deliver this dynamic mapping and also to start consolidating our existing dynamic support in our SDO and DBWS components into a more general solution that be used out of the box with JPA.
    I have started a wiki page to illustrate how this functionality can be used. Take a look and let me know if this might address your requirements.
    http://wiki.eclipse.org/Eclipselink/Examples/JPA/Dynamic
    Doug

  • Transfer Object in JSF, Spring, and Hibernate

    The application on which I am working deploys the JavaServer Faces, Spring and Hibernate frameworks.
    We are going to use the "transfer object" to move data between J2EE tiers from the front end to the back end and vice versa. In addition, data "types" may need to be converted --
    At the front end, the "type" of the data that are entered by users may not match that in the database table. For example, checkboxes may be marked or left blank by users. The "type" of the checkboxes is "boolean" in the JSF backing bean. However, we have either "Y" or "N" for the corresponding field in the database table.
    The JSF backing bean holds data as well as controller functionality. Of course, the transfer object holds data only.
    With regard to class properties, Is the transfer object an exact copy of the JSF backing bean? And at which tier the data are converted to match their correspoding "types" in the database tables?
    We also have the "data objects" which are exact representation of database tables.
    Thanks for your advices.

    Small example: you can decide in the business layer
    whether to convert it to boolean or Boolean (which
    has a 3rd state: null).But it all goes back to your data model. If your data model supports null for that property, then of course boolean is a poor choice. If that case one could use Boolean. None of this has anything to do with re-usability, which was your objection.
    I think the re-usability question goes back to the data model as well. Suppose your data model says this property is boolean valued. However if your database does not support booleans natively, then you need to map the value for storage in the database. But that is the data persistence layers problem.
    OTOH, suppose your data model says that this property may be 'Y' or 'N'. Then the Java class represent the business object should not have a boolean property, we should make it match the data model.
    However, I think that most cases where people are storing 'Y' or 'N' in a field in the database fall into the first case, where the data model is a boolean and they are working around limitations in the database. There is no reason in that case to perpetuate the same limitations in the Java code.

  • RE: Dynamically mapping data to widgets

    One quick and dirty solution would be something like this (though not
    terribly efficient):
    newPanel : Panel;
    newPanel = <panelCreatedFromWindowWorkshop>.Clone(deep = TRUE);for childWidget in newPanel.children do
    -- check if the childWidget field name matches field name to be
    set
    if childWidget.name.isEqual(source=<..FieldNameToSet..>,
    ignoreCase=TRUE) then
    dataWidget : dataField = dataField(childWidget);
    if dataWidget.textvalue = NIL then
    dataWidget.textvalue = new;
    end if;
    -- set the textvalue of the childWidget to required
    value
    dataWidget.textvalue.setvalue('WORKS !');
    end if;
    end for;
    Your problem would have been directly solved if the Forte library class
    CompoundField provided a SetDataObject( ) method corresponding to the
    GetDataObject( ) method.
    According to Forte Help - "The GetDataObject method returns the object
    that the compound field is mapped to. If the compound field is not
    mapped to an object, this method returns NIL."
    Maybe Forte could consider providing this in a future release.
    Another option would have been to use the GetFieldByName( ) method on
    the newly created panel to get at the child widgets directly.
    According to Forte help - "GetFieldByName is designed for use in dynamic
    applications. For example, you can use GetFieldByName to retrieve the
    names of dynamically created fields for immediate use in dynamic
    applications."
    This works fine for compile-time named widgets, but I couldn't get it to
    work for the newPanel child widgets using the code below, or maybe I am
    missing something here.
    newPanel : Panel;
    newPanel = <panelCreatedFromWindowWorkshop>.Clone(deep = TRUE);newPanel.name.setvalue('newPanel');
    newPanel.parent = <aGridField>;
    dataWidget : dataField = dataField(newPanel.getFieldByName('age'));
    (OR)
    dataWidget : dataField =
    dataField(<aGridField>.getFieldByName('newPanel.age'));
    (OR)
    dataWidget : dataField =
    dataField(self.window.getFieldByName('newPanel.age'));
    In all cases the return value was NIL.
    Maybe someone from Forte could shed more light on this.
    Hope this helps.
    Prashant.
    From: Richard Finegan[SMTP:[email protected]]
    Reply To: Richard Finegan
    Sent: Thursday, August 13, 1998 2:27 PM
    To: 'Forte Users Mailing List'
    Subject: Dynamically mapping data to widgets
    Here's what I'm trying to do:
    I have a panel with a bunch of data fields that I've mapped to an
    object.
    I want to replicate the panel several times to programmatically
    populate a
    TabFolder (although the TabFolder bit isn't really relevant here, I
    think).
    But I can't figure out how to get at the mapped data in the replicas
    of my
    object...
    newPanel : Panel;
    newPanel = <panelCreatedFromWindowWorkshop>.Clone(deep = TRUE);
    panelCreatedFromWindowWorkshop.anAttributeOfObjMappedToPanel =
    something;
    // tada! "something" appears in a data field of the original panel
    newPanel.? = something; // how to do the same thing with the new
    panel?
    How do I map an object to the replicated panel? I've experimented
    with
    assigning "Widget.AppData" to a new object, but I can't seem to get it
    to
    do anything...
    Thanks in advance for your help.
    Richard Finegan
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive
    <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

    Hi Michael,
    did you find any solution?
    I've the same problem.

  • Dynamic mapping in BizTalk orchestration using BRE

    Hi,
    I want to do a transformation dynamically based on the schema type (document strong name). In one of the thread, I saw a solution for a similar problem, but in which an additional field was needed to be added to the schema to hold the map name. In my scenario,
    i will not be able to add the additional field to the schema.
    Can you please suggest an approach where I can set my map name in the BRE (based on the document strong name and retrieve the map name in the orchestration.
    Regards,
    Ujjwal
    -Ujjwal

    Have you considered " BRE Pipeline Framework", I know some of the BizTalk project uses it and it quite good. I don't want to duplicate this forum with how this works as
    the details are already available online. Find the following reference on how this can be used with BRE and in what use cases this can be really helpful. Hope this helps.
    Using the BRE Pipeline Framework to execute maps dynamically
    Also Paolo Salvatori's component is also quite popular on this context, but this doesn't directly implement using BRE.
    But this just for your reference.
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Dynamic mapping using xslt

    I have question regarding XSLT map. I saw xslt is embedded  as part of map dll. Now I have case like different vendors are sending me files in different structure . Let me clear here all my input is EDI files.
        Example one vendor is sending HL segment at header level and one at detail level. Other vendor send only at header level . So surely my map logic is different .
        So I was thinking create XSLT for each vendor and load dynamically based on ISA Id and GSId. Is it possible that load xslt dynamically something like this?
      If(ISAId == "sender1" && GSId ="sender1)
       //code to load map dll
      map1.LoadXslt(sender1xslt).
    What is better way to handle this case . I  am not considering to create at receive location as I will get data from AS2 and I will have only one receive location.
       What is better approach for this? Do I need to create  separate  map for each TP and load it?
    Please let me what is better approach in this case?

    I tried one small sample with keeping map name in config file as 
    <add key="Map1" value="DynamicMap.OrdMap,DynamicMap, Version=1.0.0.0, Culture=neutral, PublicKeyToken=51b3a99d8425ff5a"/>
    <add key="Map2" value="DynamicMap.OrdMap2,DynamicMap, Version=1.0.0.0, Culture=neutral, PublicKeyToken=51b3a99d8425ff5a"/>
    then in orchestration have 
    expression shape with 
    MapName = System.Configuration.ConfigurationManager.AppSettings["Map1"];
    MyMapType = System.Type.GetType(MapName);
    Then messageassignment shape with 
    transform(OutMsg) = MapName(InMsg);
    When I test it get following error with message get suspended
    Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'DynamicMap.OrdOrc(948a9a82-1325-e745-d019-d110d636f3fd)'.
    The service instance will remain suspended until administratively resumed or terminated. 
    If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
    InstanceId: 9c6f164e-b194-4acf-ad14-cb3fcfdcea7d
    Shape name: ConstructMessage_1
    ShapeId: 595267b1-451b-42a3-b0e4-9ecca16205d9
    Exception thrown from: segment 1, progress 11
    Inner exception: Error encountered while executing the transform System.String. Error:Unable to create the transform..
    Exception type: XTransformationFailureException
    Source: Microsoft.XLANGs.Engine
    Target Site: Void ApplyTransform(System.Type, System.Object[], System.Object[])
    The following is a stack trace that identifies the location where the exception occured
       at Microsoft.XLANGs.Core.Service.ApplyTransform(Type mapRef, Object[] outParams, Object[] inParams)
    Can anybody help me what it mean?

  • Dynamic mapping for alv

    Hi All,
    I need to display three tables  using alv.
    i have used one alv component  in my application.
    In my context  i have three nodes ( for three tables )
    when i am trying to map  one node of my component control to  'DATA' of alv component
    its working fine. i am getting the data of one table .
    Now , my problem is for the remainig two tables . how these two nodes are mapped for the same alv 'DATA' attribute of alv component.
    Whether i need to create  two more  alv components or Is there any possible to dynamic mapping ?
    Thanks and Regards,
    sravan.

    Hi Sravan,
    Now , my problem is for the remainig two tables . how these two nodes are mapped for the same alv 'DATA' attribute of alv component
    You cann't map the multiple context nodes to the DATA node of interface controller.You have to declare 3 component usages.
    or
    you want to set the map the dynamically then use this code.
    data:l_ref_interfacecontroller type ref to iwci_salv_wd_table.
    l_ref_interfacecontroller = wd_this->wd_cpifc_alv( ).
    l_ref_interfacecontroller->set_data( lo_node ).

  • Dynamic mapping

    Hi,
    how to make dynamic mapping?
    Is it possible to make mapping at runtime?
    Thanks a lot.
    Regards,
    Jorge Luiz

    Hello,
    Please see these:
    [Dynamic Context Creation, Mapping, and Data Binding|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/6fdae690-0201-0010-a580-d104b459cb44]
    [Web Dynpro ABAP: Dynamic Context Creation, Mapping, and Data Binding|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/201ddd3b-b4ce-2b10-8883-880ae8147f89]
    Regards

  • Add Image to Jasper Report with Struts 2 and Hibernate

    Hi I want to add image to jasper report[pdf] in the environment of Struts 2 framework and hibernate. I am trying
    this for last couple of days, but i am unable to get the work done. if any body know the steps to add image to
    jasper reports, please help me or if u have any tutorials please let me know. I am using iReport-nb-3.5.0 to generate jasper files.
    Thanks in advance

    Finally i found a way to add image to jasper report. It is pretty simple, just give the exact image location to the image expression. In your web application, the image location may vary so, dynamically set the image location from your model class. Also, make sure that your lib folder contains itext-1.3.1.jar. If your lib folder contains itext-1.3.1.jar and iText-2.1.3.jar u will get like: java.lang.NoSuchMethodError: com.lowagie.text.Image.plainWidth()F
    So remove the iText-2.1.3.jar and keep only itext-1.3.1.jar, try this will work

  • Elements 11 vs 13: how can I add a new place tag to my PSE13 database without using the wretched and totally inadequate map technology  that Elements 13 wants to impose.

    HI,
    I have recently installed Elements 13 having used Elements 11.0 successfully to build a database of 30,000 plus images indexed by place, people, and photo date. Elements 11 allowed me to add new places which are meaningful to me but which are a complete mystery to the mapping technology of Elements 13. For example some years ago I lived in London in a road called Argyle Road. In elements 11 I could enter the place tag as Argyle Road. In Elements 13 I am required to locate Argyle Road on the map, but the map presupposes that the Argyle Road I am referring to is in Ealing in West London. It is not!
      I now live in a place called Broadsands but the Elements 13 Map places this 0.5 miles away from what I would describe as Broadsands.
      So the question: how can I add a new place tag to my database without using the wretched and totally inadequate map technology  that Elements 13 wants to impose.

    Thank you for your quick response, BalusC. I really appreciate your answer.
    Yes, you are right. If I manually code the same amount of those components in the JSF pages instead of generating them dynamically, the server will still run out of memory. That is to say, JSF pages might not accommodate a great deal of concurrent visiting. If I upgrade the server to just allow 1,000 teachers making their own test papers at the same time, but when over 2,000 students take the same questionnaire simultaneously, the server will need another upgrading. So I have to do what you have told me, using JS+DOM instead of upgrading the server endlessly.
    Best Regards, Ailsa

  • What are the relation between JPA and Hibernate, JPA and TopLink?

    What are the relation between JPA and Hibernate, JPA and TopLink?
    Can JPA instead of Hibernate and TopLink?

    The Java Persistence API (JPA) is the object relational mapping persistence
    standard for Java. Hibernate and TopLink provide an Open source Object-relational mapping framework for Java.
    They provide an implementation for the Java Persistence API. In my opinion, both Hibernate and TopLink provide support to JPA
    and they can also be regarded as the complementary to JPA.
    Let's wait to see other person's opinions.

  • How to give dynamically mapping in interface

    Hi all,
    I have requirement for this requirement i am thinking various scenarios,
    could please tell me is there any way to we can give source,target data stores and mapping dynamically(execution time) to the interfaces ? if it is possible then i can re use job again and again ?
    please give your solutions for this post
    Thanks,
    Surya.

    Please let me know if I miss the mark here.
    If you are trying to build the 150 interfaces without spending the time to do so manually, use the ODI SDK. Check out David Allan's blog post for examples here https://blogs.oracle.com/warehousebuilder/entry/odi_11g_interface_builder. You can build your interfaces once - without need for dynamic mapping at execution time.
    I'm pretty sure there is no good way in ODI "out of the box" to dynamically map columns at execution time, but I imagine you could use the ODI SDK to write a Java program that does so. Then, use the Open Tools feature in ODI to run the Java program within your ODI processes. I'm not sure the value of this, but I do not have a full understanding of your requirement.
    I hope this helps. Enjoy!
    Michael R.

Maybe you are looking for