CF9 ORM anf Flex bidirectional relation

Hello,
I'm working with two object which are in one-to-many relation "installazioni" (one) and "interventi"(many), which I have to show in three different way.
In the first view I show the complete list of "interventi" in another view I show the complete list of "installazioni" and in the last view I show one "installazioni" and the related "interventi".
The problem is to show the "interventi" cause some of the property I have to show are related to its "installazioni" master record.
I defined the to object in this way :
*** Installazioni ***
component persistent="true" alias="Installazioni" 
    property name="IDInstallazione" column="IDInstallazione" type="numeric" ormtype="int" fieldtype="id" default="0" generator="identity" unsavedvalue="0";
    property name="SerNo" column="SerNo" type="string" ormtype="string";
    property name="IDArticolo" column="IDArticolo" type="numeric" ormtype="int";
    property name="ScadGar" column="ScadGar" type="date" ormtype="timestamp";
    property name="Versione" column="Versione" type="string" ormtype="string";
    property name="ROM" column="ROM" type="string" ormtype="string";
    property name="PrinterSN" column="PrinterSN" type="string" ormtype="string";
    *** Interventi relation ***
    property name="InterventiInstallazione" type="array" fieldType="one-to-many" cfc="Interventi" fkcolumn="IDInstallazione" remotingfetch="true" lazy="false" inverse="true";
*** Interventi ***
component persistent="true" alias="Interventi"
    /* properties */
    property name="IDIntervento" column="IDIntervento" type="numeric" ormtype="int" fieldtype="id" ;
    property name="UltimoCT" column="UltimoCT" type="numeric" ormtype="double" ;
    property name="UltimoCHtot" column="UltimoCHtot" type="numeric" ormtype="double" ;
    property name="Soluzione" column="Soluzione" type="string" ormtype="string" ;
    property name="DurataIntervento" column="DurataIntervento" type="numeric" ormtype="double" ;
    property name="PresaVisione" column="PresaVisione" type="numeric" ormtype="boolean" ;
    property name="Cicli" column="Cicli" type="numeric" ormtype="int" ;
    property name="Ore" column="Ore" type="numeric" ormtype="int" ;
    *** Installazioni inverse relation  ***
    property name="Installazione" type="Installazioni" fieldtype="many-to-one" cfc="Installazioni" fkcolumn="IDInstallazione" remotingfetch="true" lazy="false";            
For ex. I need to show the SerNo property in the list of "interventi" referring to the "installazione" property.
In standard HTML everything works and I can show the "SerNo" property (Interventi.Installazione.SerNo).
In Flex the when I try to retrieve the "installazione" valueObject I can read correctly the "interventiInstallazione" array but I can't access the "Installazione" property of each "InterventiInstallazione" element cause it is null.
Following the two VO declaration :
*** Installazioni ***
package valueObjects {
    import mx.collections.ArrayCollection;
    [RemoteClass(alias="CBCWeb.cfcs.Installazioni")]
    [Bindable]
    public class Installazioni {
        public var IDInstallazione:Number = 0;
        public var SerNo:String = "";
        public var IDArticolo:int = 0;
        public var ScadGar:Date = null;
        public var Versione:String = "";
        public var ROM:String = "";
        public var PrinterSN:String = "";
        public var InterventiInstallazione:Array;
*** Interventi
package valueObjects {
    [RemoteClass(alias="CBCWeb.cfcs.Interventi")]
    [Bindable]
    public class Interventi {
        public var IDIntervento:Number = 0;
        public var UltimoCT:Number = 0;
        public var UltimoCHtot:Number = 0;
        public var Soluzione:String = "";
        public var DurataIntervento:Number = 0;
        public var PresaVisione:Number = 0;
        public var Cicli:Number = 0;
        public var Ore:Number = 0;
        public var Installazione:Installazioni;
Following the result of reading one "installazione" :
Where I made the mistake ?
How can I retrieve the inversed relational property to show its values for the object sleected ?
Thanks in advance,
Davide

I struggled with this for hours a few weeks back.  Add the attribute remotingfetch="true" to your relationship like this:
<cfproperty name="Tenants"
                    fieldtype="one-to-many"
                    singularname="Tenant"
                    cfc="Tenants"
                    mappedby="Tenants"
                    fkcolumn="TenantID"
                    remotingfetch="true"
                    lazy="false"
                    type="array"
                                <!--- can be array or struct ---> 
                    <!---structkeytype="int" structkeycolumn="ID"--->
                    />
Hope this helps!

Similar Messages

  • How to ask CF9 ORM to use CHAR(2)?

    How to ask CF9 ORM to use CHAR(2)? Thanks.

    Your code works.  I realized that sqltype"char(n)" cannot be used as FK for a many-to-one object.
    component persistent=true entityName="parent"
         // this works
         //property name="parentId" fieldtype="id" ormtype="integer";
         // this works
         //property name="parentId" fieldtype="id" ormtype="string" length="2";
         // this doesn't work
         property name="parentId" fieldtype="id" sqltype="char(2)";
    component persistent=true entityName="child"
         property name="childID" fieldtype="id" ormtype="integer" generator="identity";
         property name="parent" fieldtype="many-to-one" fkcolumn="parentId" cfc="parent";
    Throws:
    org.hibernate.JDBCException: Error during DDL export
         at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:345)
         at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:262)
    Caused by: java.sql.SQLException: [Macromedia][SQLServer JDBC Driver][SQLServer]Column 'parent.parentId' is not the same data type as referencing column 'child.parentId' in foreign key 'FK5A3F51CAB69BEF'.
         at macromedia.jdbc.sqlserverbase.BaseExceptions40.createAppropriateSQLExceptionInstance(Unknown Source)

  • How to determine a Bidirectional relation when add a related Content in UCM

    Good Day All,
    i want to use "ADD_RELATED_CONTENT" service that are defined within the LinkManager Component.
    i use the following parameters in my code and it works fine
    request.putLocal("IdcService", "ADD_RELATED_CONTENT");
    request.putLocal("dLinkTypeID", "4");
    request.putLocal("dSource", "CS");
    request.putLocal("dID", "16162");
    request.putLocal("addLinkID", dId);
    what i want to do:
    - add a related content of type Cross-Reference Class (dLinkTypeID=4) with Bidirection relation not unidirection. The above code add a content as a unidirection relation.
    is there is any specific parameter that i need to specify in order to determine the Bidirectional relation?
    Regards.

    actually am working on related content services; handle them thourgh (JAVA + RIDC).My general recommendation is: turn on server-wide tracing on requestaudit (or perhaps sometimes even services) - see http://docs.oracle.com/cd/E23943_01/doc.1111/e10792/c03_processes.htm#CSMSP535 how to do that, perform the scenario from GUI, and check what's being called. Often, you will find your answer there.

  • EJB bidirectional relations

    Like in this manual
    http://help.sap.com/saphelp_nw04/helpdata/de/76/c6ba3eb645dc61e10000000a114084/content.htm
    i tried to map EJB-Fields from different EJBs to an existing dictionary. Inside the ejb-jar.xml was the following text:
    <i>    <relationships>
            <ejb-relation>
                <description>description</description>
                <ejb-relation-name>CatDatRelation</ejb-relation-name>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>com.eonis.test.CategoryBean</ejb-relationship-role-name>
                    <multiplicity>Many</multiplicity>
                    <relationship-role-source>
                        <ejb-name>CategoryBean</ejb-name>
                    </relationship-role-source>
                    <cmr-field>
                        <cmr-field-name>catDatRel</cmr-field-name>
                        <cmr-field-type>java.util.Set</cmr-field-type>
                    </cmr-field>
                </ejb-relationship-role>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>com.eonis.test.DataBean</ejb-relationship-role-name>
                    <multiplicity>Many</multiplicity>
                    <relationship-role-source>
                        <ejb-name>DataBean</ejb-name>
                    </relationship-role-source>
                </ejb-relationship-role>
            </ejb-relation>
        </relationships></i>
    How do I the many-to-many-relationship? My Guess was:
    <i>    <relationships>
            <ejb-relation>
                <description>description</description>
                <ejb-relation-name>CatDatRelation</ejb-relation-name>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>com.eonis.test.CategoryBean</ejb-relationship-role-name>
                    <multiplicity>Many</multiplicity>
                    <relationship-role-source>
                        <ejb-name>CategoryBean</ejb-name>
                    </relationship-role-source>
                    <cmr-field>
                        <cmr-field-name>catDatRel</cmr-field-name>
                        <cmr-field-type>java.util.Set</cmr-field-type>
                    </cmr-field>
              <cmr-field>
                        <cmr-field-name>DatCatRel</cmr-field-name>
                        <cmr-field-type>java.util.Set</cmr-field-type>
              </cmr-field>
                </ejb-relationship-role>
                <ejb-relationship-role>
                    <ejb-relationship-role-name>com.eonis.test.DataBean</ejb-relationship-role-name>
                    <multiplicity>Many</multiplicity>
                    <relationship-role-source>
                        <ejb-name>DataBean</ejb-name>
                    </relationship-role-source>
                </ejb-relationship-role>
            </ejb-relation>
        </relationships></i>
    It didn't work. Can anybody help me, please?

    Hi Richard,
    You can only have 0 or 1 cmr-field per ejb-relationship-role. So to make the relationship bidirectional, the second cmr-field should be in the second ejb-relationship-role:
    <i><relationships>
    <ejb-relation>
    <description>description</description>
    <ejb-relation-name>CatDatRelation</ejb-relation-name>
    <ejb-relationship-role>
    <ejb-relationship-role-name>com.eonis.test.CategoryBean</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source>
    <ejb-name>CategoryBean</ejb-name>
    </relationship-role-source>
    <cmr-field>
    <cmr-field-name>catDatRel</cmr-field-name>
    <cmr-field-type>java.util.Set</cmr-field-type>
    </cmr-field>
    </ejb-relationship-role>
    <ejb-relationship-role>
    <ejb-relationship-role-name>com.eonis.test.DataBean</ejb-relationship-role-name>
    <multiplicity>Many</multiplicity>
    <relationship-role-source>
    <ejb-name>DataBean</ejb-name>
    </relationship-role-source>
    <b><cmr-field>
    <cmr-field-name>DatCatRel</cmr-field-name>
    <cmr-field-type>java.util.Set</cmr-field-type>
    </cmr-field></b>
    </ejb-relationship-role>
    </ejb-relation>
    </relationships></i>
    Hope that helps,
    Vladimir

  • Creating Indexs with CF9 ORM

    I'm just starting to play around with CF 9's ORM some, and I love that I can have it automatically create tables for me.  But one thing I have haven't been able to figure out yet is, is there a way to create indexes on tables via CF 9's ORM?  I'm not talking about the indexes for primary keys or FK relationships to other tables.  I'm wanting to create indexes on table columns not related to other tables. 
    Is this doable in ORM, or am I just going to have to create the tables on the DB server to do it?

    i actually RTFM! so far i got the children relationship working like this
    property name="children"
        fieldtype="one-to-many"
        cfc="Object"
        linktable="ObjectRelation"
        fkcolumn="parentID"
        singularname="child"
        lazy=true
        inversejoincolumn="childID";
    i had the "inverse" version of this for the parent relationship, it didn't work all to well though.
    property name="parent"
        fieldtype="many-to-one"
        cfc="Object"
        linktable="ObjectRelation"
        fkcolumn="childID"
        lazy=true
        inversejoincolumn="parentID";
    with that whenever i try to call object.getParent().getName() i get a
    Error Messages: Value must be initialized before use.
    Its possible that a method called on a Java object created by CreateObject returned null.

  • Cisco Flex connect related query

    Hi,
    My Corporate Headquarters has:
    1. Cisco 5508 WLC
    2. Centralized RADIUS server
    A MAC address repository is created in the WLC for MAC address authentication. This includes MAC addresses of users from the Headquarters as well as the remote branch 
    offices.
    My remote branch offices have:
    1. APs deployed in Flex Connect mode
    2. Local DHCP server
    3. Local RADIUS server
    I have 5 SSIDs being broadcasted in the remote branch location from the Flex Connect APs.
    SSID1 ----> RADIUS + Certificate + MAC filtering
    SSID2 ----> RADIUS + Certificate
    SSID3 ----> MAC filtering
    SSID4 ----> WPA2-PSK
    SSID5 ----> Web Authentication using portal page
    The headquarters is connected to the remote branch locations using an MPLS link.
    When the MPLS link between the remote location and the headquarters is up, the centralized RADIUS server at the headquarters would be preferred for authentication of 
    the users.
    In case the MPLS link goes down, which SSIDs would still carter to the users and which SSIDs would stop functioning?
    Will SSID1 still work by authenticating new users from the remote location AD server? Or would the authentication fail if the MAC address repository is not reachable.
    Will SSID2 work for remote location users? Will the Flex Connect APs switch to authentication using the local RADIUS server?
    Thanks in advance.

    Similar post:
    Go HERE

  • Cf9 - flex - orm updating entity with a relation

    Hello,
    I'm trying to update a cf9 orm entity with a one-to-many relation defined as follow:
    Articles
    property name="ArticleID" column="ArticleID" type="numeric" ormtype="int" fieldtype="id" default="0" generator="identity" unsavedvalue="0";
    property name="ModelName" column="ModelName" type="string" ormtype="string" ;
    property name="Description" column="Descrption" type="string" ormtype="string" ;
    property name="ArticleImages" type="array" fieldtype="one-to-many" cfc="Images" fkcolumn="ArticleID" fetch="join" remotingfetch="true" cascade="all-delete-orphan";                       
    Images
    property name="ArticleImageID" column="ArticleImageID" type="numeric" ormtype="int" fieldtype="id" generator="identity" default="0" unsavedvalue="0";
    property name="ArticleID" column="ArticleID" type="numeric" ormtype="int"; 
    property name="FilePath" column="FilePath" type="string" ormtype="string";
    Everything works fine if I update (entitysave) Articles by a coldFusion page.
    If I try by a Flex app using remoteObject all records are written with right values but I receive a fault event with a message which say the ArticleID of the table Images can't contain a Null value.
    In fact in the database the ArticleID field is right updated but I don't know why I receive always the same error.
    The remote object mapping seems to be right established.
    I'm testing with a SQL2008R2 database and all the tables have an IDENTITY primary key field.
    Does anybody have experienced this situation ?
    How can I solve this problem ?
    Thanks,
    Daive

    Did you have tried "entitymerge" instead of "entitysave" ?

  • ORM framework for AIR

    Christophe Conraets desribes
    in
    his blog a nice solution to map objects to a relational
    database, say SQLite. In
    another
    article Christophe develops based on this concept a simple
    contact management solution.
    Christophe uses Flex' annotation drive the ORM process: Based
    on annotations in Flex source, the ORM transparently creates an
    adequate SQLite DB and all CRUD operations for this database.
    While his approach is nice, I'd prefer to use a complete a
    complete ORM framework, which provides more features.
    A quick Google search failed. Does anybody know of a Flexbase
    ORM?
    Please note, that I don't try to communicate with a server.
    In fact, I'd like to save networks of objects to a local store,
    e.g. SQLite or XML.

    Here are the ORMs that I have found so far. None seem to have a dedicated following, and all seem to lack documentation.
    http://flexorm.riaforge.org/
    http://code.google.com/p/airorm/
    http://code.google.com/p/air-activerecord/
    I would love to see an ORM solution that has a more active following and that is being actively maintained. Unfortunately I lack the experience and knowledge, not to mention time, to set one up myself and maintain it on an ongoing basis.
    There seems to be some hubbub around http://www.matsiya-technology.com/introducing-sofa-an-adobe-air-orm-for-sqlite/#comments, but not sure if this project died or not. There don't seem to be any links to anything implementable.
    What other ORMs do people use for AIR? I haven't been able to find much of anything else. (Using an ORM for FLEX is a bit redundant, as most of the times the data will come from mysql and will be handled by PHP first, then transferred as RemoteObjects, althought I would think it is possible to build FLEX apps that stand on their own.)
    ~Mike

  • Upgrading from CF7 to CF9 breaks my RemoteClasses?

    Hi gang... this problem has been kicking my butt all day, thought it was time to ask the forum.
    We have a few Flex apps as part of our site, using Coldfusion as a back end (through Flash Remoting).
    Our production and dev servers are running CF7. The Flex apps work fine in that environment.
    We just set up a CF9 dev server, though, as we want to upgrade. Strangely, SOME of the Flex code is barfing in this environment. It seems to specifically relate to RemoteClasses of Actionscript Value Objects.
    For example, I have this AS class:
    package models
    import com.roguedevelopment.objecthandles.ObjectHandles;
    [RemoteClass(alias="DocumentPageFieldBean")]
    [Bindable]
    public class DocumentPageField extends ObjectHandles
    public var DocumentPageFieldID:Number = 0;
    public var DocumentPageID:Number = 0;
    public var DocumentComponentID:Number = 0;
    public var Required:Number = 0;
    public var DocAnswer:DocumentAnswer;
    public var ElementID:int = 0;
    public var filter:String = "";
    public var start:int = 0;
    public var char:int = 0;
    public var tab:int = 0;
    public var type:String = "";
    public var defaultdata:int = 0;
    public var defaultdate:String = "";
    public var limit:int = 0;
    public function DocumentPageField()
    Referring to a CFC at {cfcpath}.flex.Document.DocumentPageFieldBean
    This has never caused issues in the past... but today, no matter what, I get:
    (mx.rpc::Fault)#0
      errorID = 0
      faultCode = "Client.Packet.Encoding"
      faultDetail = (null)
      faultString = "Error deserializing client message."
      message = "faultCode:Client.Packet.Encoding faultString:'Error deserializing client message.' faultDetail:'null'"
      name = "Error"
      rootCause = (Object)#1
        cause = (null)
        detail = "Ensure that the name is correct and that the component or interface exists."
        localizedMessage = "Could not find the ColdFusion component or interface DocumentPageFieldBean."
        message = "Could not find the ColdFusion component or interface DocumentPageFieldBean."
        missingFileName = "DocumentPageFieldBean"
        rootCause = (null)
        type = "Application"
    I've tried to use the registerClassAlias method, which did nothing. I've also tried changing the RemoteClass to [RemoteClass(alias="{cfcpath}.flex.Document.DocumentPageFieldBean")], which I know makes no sense since we are referring to the alias, but tried anyway. No luck.
    Any ideas? I can't find anything on the net relating to this.. and once again, If I drop it in CF7, works fine. I've of course confirmed the CFCs are there in the same path structure as CF7.

    Hi,
    In CF9, we have introduced some changes in Flash remoting. Because of that there are few changes in WEB-INF/flex.Config-XML files at Destination and Channel level. Some of the Elements which used to exist at Channel level in CF8/CF7, have now been shifted to Destination level in CF9.
    I would suggest you to go through this "Enhanced Flash Remoting" feature doc to get idea about changes done. By Default CF9, now ships XML files with these new changes. And a Recompilation of your Old Flex Application is required to be done against these new Config XML files.
    I dont know, how you have migrated your Channels/Destinations from CF7 to CF9. Migration changes are mentioned in the Doc. Please go through it.
    If you can answer some of these questions, I will have better clarity.
    --> Do you Observe any Error related to Flash remoting on Server startup?
    --> Have you directly copied your OLD CF7 Config-XML files on CF9?
             If YES, this means that Old Flash remoting is being used on CF9 and so You dont need to Recompile your Flex Application and it should just work fine the way it used to work in CF7/CF8.
             If NO, it means that you are using "Enchanced/Improved Flash Remoting" feature of CF9  But with Flex Application compiled with CF7/CF8 Style Flash Remoting. In this case, refer to the Documentation and add your Required Destinations as per the new Flash remoting specification.
    CF9 continues to support CF7/CF8 style Flash Remoting as well and whether to use OLD Flash Remoting or New Flash remoting will be decided by CF based upon the Format of the Config XML files.
    --> Are these Flex Application using LCDS as well?
    Thanks
    Jayesh Viradiya

  • Kodo 3.3.3, InverseManager, 1:1 Relation

    Hi,
    I am evaluating Kodo at the moment and have a problem with the inverse
    manager. I have a class 'BaseClassPC' which has a reference to a class
    'ReferencedClassPC'. It is a simple 1:1 bidirectional relation, so in
    the table for class 'BaseclassPC' I have a column
    'REFERENCEDCLASS_JDOID' which points to the JDOID of the referenced
    class. I have no foreign key back from REFERENCEDCLASS to BASECLASS.
    Now, when I want to set the association between the two objects in my
    code this only works when I call baseclass.setReferencedClass(...). When
    I try to do it the other way round (referencedclass.setBaseclass(..)) I
    get an exception on commit, even though I set kodo.InverseManager=true
    in my kodo.properties. The error only occurs when I create both objects
    and set the reference within one transaction. Excerpt from the stacktrace:
    NestedThrowablesStackTrace:
    kodo.util.FatalUserException: Attempt to set column
    "BASECLASSPC.REFERENCEDCLASS_JDOID" to two different values:
    (null)"null", (class java.lang.Long)"251" This can occur when you fail
    to set both sides of a two-sided relation between objects, or when you
    map different fields to the same column, but you do not keep the values
    of these fields in synch.
         at kodo.jdbc.sql.PrimaryRow.setObject(PrimaryRow.java:215)
         at kodo.jdbc.sql.RowImpl.flushJoinValues(RowImpl.java:267)
         at kodo.jdbc.sql.RowImpl.flushForeignKey(RowImpl.java:189)
         at kodo.jdbc.sql.RowImpl.setForeignKey(RowImpl.java:158)
         at kodo.jdbc.sql.PrimaryRow.setForeignKey(PrimaryRow.java:128)
    The doku for the inverse manager says 'Under this setting, Kodo detects
    changes to either side of a bidirectional relation, and automatically
    sets the other side appropriately on flush.' So I was expecting that it
    does not matter on which side I set the relation, nor that I have to set
    the relation in two separate transactions, am I wrong?
    Here is the sample code, executed in a single transaction:
    BaseclassPC base = new BaseclassPC();
    ReferencedClassPC ref = new ReferencedClassPC();
    //base.setRefClass(ref); <-- works
    ref.setSubclass(base); <-- fails
    getPersistenceManager().makePersistent(base);
    getPersistenceManager().makePersistent(ref);
    BTW: It does not matter in which order I make the calls to
    makePersistent(...).
    Thanks very much,
    Jochen

    Hi Stephen,
    shame on me, I really forgot the put this attribute, sorry that I
    bothered you. Another question about the inverse manager: Are there any
    limitations that I have to take into account when mapping my classes?
    E.g. I read somewhere in this forum that the IM does not work for
    horizontal mappings. Background is that I want to switch from another
    JDO vendor to Kodo, because the other vendor's implementation of inverse
    management was damn buggy, and I want to make sure to have reliable
    inverse management this time ;)
    Thanks,
    Jochen
    Stephen Kim wrote:
    Did you set the inverse-owner attribute? Kodo will only manasge
    inverses which are marked as inverse relations.
    Jochen Kressin wrote:
    Hi,
    I am evaluating Kodo at the moment and have a problem with the inverse
    manager. I have a class 'BaseClassPC' which has a reference to a class
    'ReferencedClassPC'. It is a simple 1:1 bidirectional relation, so in
    the table for class 'BaseclassPC' I have a column
    'REFERENCEDCLASS_JDOID' which points to the JDOID of the referenced
    class. I have no foreign key back from REFERENCEDCLASS to BASECLASS.
    Now, when I want to set the association between the two objects in my
    code this only works when I call baseclass.setReferencedClass(...).
    When I try to do it the other way round
    (referencedclass.setBaseclass(..)) I get an exception on commit, even
    though I set kodo.InverseManager=true in my kodo.properties. The error
    only occurs when I create both objects and set the reference within
    one transaction. Excerpt from the stacktrace:
    NestedThrowablesStackTrace:
    kodo.util.FatalUserException: Attempt to set column
    "BASECLASSPC.REFERENCEDCLASS_JDOID" to two different values:
    (null)"null", (class java.lang.Long)"251" This can occur when you fail
    to set both sides of a two-sided relation between objects, or when you
    map different fields to the same column, but you do not keep the
    values of these fields in synch.
    at kodo.jdbc.sql.PrimaryRow.setObject(PrimaryRow.java:215)
    at kodo.jdbc.sql.RowImpl.flushJoinValues(RowImpl.java:267)
    at kodo.jdbc.sql.RowImpl.flushForeignKey(RowImpl.java:189)
    at kodo.jdbc.sql.RowImpl.setForeignKey(RowImpl.java:158)
    at kodo.jdbc.sql.PrimaryRow.setForeignKey(PrimaryRow.java:128)
    The doku for the inverse manager says 'Under this setting, Kodo
    detects changes to either side of a bidirectional relation, and
    automatically sets the other side appropriately on flush.' So I was
    expecting that it does not matter on which side I set the relation,
    nor that I have to set the relation in two separate transactions, am I
    wrong?
    Here is the sample code, executed in a single transaction:
    BaseclassPC base = new BaseclassPC();
    ReferencedClassPC ref = new ReferencedClassPC();
    //base.setRefClass(ref); <-- works
    ref.setSubclass(base); <-- fails
    getPersistenceManager().makePersistent(base);
    getPersistenceManager().makePersistent(ref);
    BTW: It does not matter in which order I make the calls to
    makePersistent(...).
    Thanks very much,
    Jochen

  • Using Flex items of JHeadstart

    Hi,
    Greetings to all.
    I have a requirement of having flex fields on an adf application we already have. So is there any way that we can customize Jheadstart to use only the flex items? i.e I would like to use JHeadstart only to define to flex region so i can control manually what goes into the screen and other things happening in View controller ?
    Thanks,
    Sam

    Sam,
    Well, not a trivial task but it can be done.
    You could create a dummy application and generate the flex regions there, and then move over the generated flex-region-related artefacts to your existing ADF application.
    Steven Davelaar,
    Jheadstart Team.

  • Annotation based depedency injection for Flex

    Proof-of-concept implementation of simple IoC container with
    the ability od annotation based injection. I'd be happy to hear
    some opinions and hints fot further developemnet. I need some
    professional advice from developers. Do You think this is a good
    way or just a dead end ?
    Container
    description
    and
    Metadata
    injection
    Feel free to comment on blog. The source is not available yet
    - it's planned on November.

    Here are the ORMs that I have found so far. None seem to have a dedicated following, and all seem to lack documentation.
    http://flexorm.riaforge.org/
    http://code.google.com/p/airorm/
    http://code.google.com/p/air-activerecord/
    I would love to see an ORM solution that has a more active following and that is being actively maintained. Unfortunately I lack the experience and knowledge, not to mention time, to set one up myself and maintain it on an ongoing basis.
    There seems to be some hubbub around http://www.matsiya-technology.com/introducing-sofa-an-adobe-air-orm-for-sqlite/#comments, but not sure if this project died or not. There don't seem to be any links to anything implementable.
    What other ORMs do people use for AIR? I haven't been able to find much of anything else. (Using an ORM for FLEX is a bit redundant, as most of the times the data will come from mysql and will be handled by PHP first, then transferred as RemoteObjects, althought I would think it is possible to build FLEX apps that stand on their own.)
    ~Mike

  • Duplicate http-based FlexSessions

    When using the BlazeDS that comes integrated with ColdFusion9, we are seeing this rpc error
    duplicate http-based FlexSessions
    I do not get any solutions offered from the ColdFusion forums, so I thought I try this one.
    Most recent occurrence is testing Blackberry Playbook apps using their simulator. (it runs on vmware Fusion).  Remote Object calls, when inside the simulator, throw this error.
    How do we prevent this error?
    Thanks,
    Don

    Unfortunately, Charles isn't "seeing" traffic coming from the VMware Blackberry simulator.  Clearly this is an issue mostly related the RemoteObject calls via VMware Fusion.  But, I have seen this error in Flex web apps and air apps too...but not as often.  So, I think there is an issue with ColdFusion 9 too.
    What is interesting is that the first time the RO call is made, you get the duplicate session error.  Then on refresh, the second call to the same RO, it works. So, this suggests it could be a Flash Builder Burrito/Blackberry issue with RO calls.  They don't work when the RO is called via the  viewActivate event, but they do work when called directly via my refresh button.  I posted this to the Blackberry Tablet forums, but no answer from Renaun and co.  Bug was submitted.
    Too many players in this issue   VMware, Blackberry Simulator, ColdFusion 9, BlazeDS, and Flash Builder Burrito.  Makes it difficult to diagnose.
    I guess I'm stuck waiting until the next Blackberry simulator/sdk comes out.
    But, I'd still like to learn more about how CF9 handles these JSESSIONS for BlazeDS and what the CF9 bug is all about related to it.
    Don

  • My app went from working fine to: Id field not defined for cfc Path.to.my.ORMCfCPag when I restarted

    Hi everyone,
    I have a CF9 ORM problem that I haven't been able to figure out and thought I'd see if you had any idea. I have seen a few postings talking about a "similar" problem but none of them correctly resolved this particular issue. I appreciate any help you can offer.
    I recently created a CF9 app where I generated scripted ORM CFCs for my app using ColdFusion Builder. It worked great and my app was completely working. However, when I was adding some enhancements, I ran into an error when I restarted the CF app server. Here's the message I keep getting:
    "Id field not defined for cfc Path.to.my.ORMCfCPage. Either the table should have a PK column mapped to a cfc field OR at least one field should be specified as id."
    My App.cfc file only had orm enabled (no other mappings) when it was working. I've since tried specifying things like the cfc location etc. and it still hasn't helped.
    // MORE DETAILS:
    - When my app was working, I had moved it to 2 other servers. I had this error on both of those but not on my local copy. They all use the exact same database.
    - The last change I made before the error was adding a generator="identity" field to my generated ORM beans. Once I got the message, I tried changing it back and restarting again but still got the error.
    - I've also made sure all of the Adobe tags are in my web root (as suggested in a prior posting about this problem). I've search all over for a solution and nobody has a solution posted online that works so far.
    Do you have any idea why this is happening?
    Thanks!
    Jeff

    Quick thought and probably not relevant, but do you have this.ormsettings.savemapping set to true in your Application.cfc? I've fallen foul of this before - once CF has generated the hbmxml files and saved them to disk you can make all kinds of changes to your code which won't make a difference as it'll continue to read from the file versions, but only for certain properties and methods at times it seems.
    Long shot I know, but I found CF ORM to be a nightmare for seemingly random caching.

  • SDK – Beginner – Installation - Compiler

    Background: I have used some HTML in high school. I have scripted in a 3D social chat environment called Second Life. I get the rough idea that you communicate through events, functions, variables, and if statements to communicate what you want a computer to do. I know nothing about Flex/Flash/AS3.0 other then the basic explanations that flash and flex are related and can makes applications that can be run in web browsers. The basic information that is repeated over and over, but still answers none of the “How” do you start.
    I ordered three Books: “Action Script for Multiplayer Games and Virtual Worlds” by Jobe Maker, “Foundation Game Design with Flash” by Rex van der spuy, and “Learning Action Script 3.0 for beginners guide” by Rich Shupe with Zevan Rosser.
    I have attempted to read each until I started to get lost and although I could follow each for the first chapters, I am completely lose when they ask me to try to make any code because the Flex SDK is a bunch of folders and some files I have no clue what they are for and with no executable file for installing some sort of application I can use. I have downloaded a trial version of Flash CS5 Web package that has a builder and flash professional, but it has likely changed from CS4 which one of the books is based on, so am unable to even start working on the first project in the book. It means a Main.AS file and a Flash.FLA file, yet FLA is not a file in CS5. So I have to put a hold on attempting that and perhaps try to use AS3.0 compiler, if I can find a way to get one or get it to work since it seems like a compiler might not be a program? I am utterly lost.
    QUESTION:
    I want a program that I can write action script in and compile so I can at the very least “start” to learn. The code will be rather basic at first like the beginning “Hello World” output in text. The issue is I have no clue how to do it in CS5 and I do not see how to install SDK or compile AS3.0 unless I can install something or run some program to do it, because the SDK zip file has folders and some miscellaneous files in it.
    Even when I read the installation there is just vague information about license and information that says nothing about the nuts and bolts of how to install and make use of this program/software I do not see.
    I am use to an “install.exe” file and you click it, run it, and then run the application that was installed, but with the SDK it sounds like “Here is a compiler program you just type into and compile to run Action Script 3.0.” yet, that is clearly not the case. I am missing some important arcane knowledge that I am not seeing or figuring out.

    Hello,  I completely understand your frustration.  A few years ago I was at your exact position.  I did not know what compiler to use,  Heck, I didn't even know what a compiler was.  I learned the hard way, sometimes learning programming languages that I was truly never going to use but wasted time learning it because I didn't know any better.
    By no means I am an expert but I felt compelled to write because I went through the exact same thing.
    My recommendations are, if you want to play around with ActionScript for Flash Player, I would start with Flex or Flash Builder.  The Reason being is that these programs have code assist which makes programming much easier and faster since they will catch your errors before you compile.
    What I did next was to purchase training videos.  I started with Flex and have since upgraded to Flash Builder.  Once you get comfortable with writing code with in Flex or Flash Builder you could incorporate Flash using CS5 if you wanted.  There are literally thousands of training videos out there.  Also check YouTube.  You can get lots and lots of training there as well.
    As far as SDK(software developer kit).  I typically get them for Flex or Flash Builder.  There are training video on the web that will show you how to load a particular SDK version on Flex or FlashBuilder.
    This is basically how I got started.  Don't get frustrated, there are lots of people out there willing to help if you just ask.
    Good Luck

Maybe you are looking for