Hello,

I'm trying to integrate FDS and Hibernate, I've gotten it mostly 
working, but I have one remaining issue...

I Have FDS running on JBoss 4.0.5GA, with hibernate 3.

I've got all the bits working except the (hibernate) "id" field is 
not coming across to Flex.  All of the other fields come across 
except this one (!)

I can see Hibernate sending the attributes, but in the Flex message 
they don't appear.
Anyone seen this happen?

* logs:
* from Hibernate:
2007-01-15 08:37:48,281 DEBUG [org.hibernate.pretty.Printer] listing 
entities:
2007-01-15 08:37:48,343 DEBUG [org.hibernate.pretty.Printer] 
[EMAIL PROTECTED], USER_NAME=ADMIN2, 
id=23}
2007-01-15 08:37:48,343 DEBUG [org.hibernate.pretty.Printer] 
[EMAIL PROTECTED], USER_NAME=ADMIN, id=22}
2007-01-15 08:37:48,343 DEBUG [org.hibernate.pretty.Printer] 
[EMAIL PROTECTED], USER_NAME=USER, id=21}

* from FDS
09:38:06,140 INFO  [STDOUT] Hibernate: select users0_.USER_KEY as 
USER1_0_, user
s0_.USER_NAME as USER2_0_, users0_.EMAIL_ADDRESS as EMAIL3_0_ from 
ID_USER users
0_
09:38:06,203 INFO  [STDOUT] [Flex] Serializing AMF/RTMP response
Version: 3
  (Command method=_result (0) trxId=3)
    (Typed Object #0 'flex.data.messages.SequencedMessage')
      sequenceId = 0
      destination = "users"
      headers = (Object #1)
      dataMessage = null
      correlationId = "35BE4552-FD9F-6E63-0542-2668798A1325"
      messageId = "6DC516AF-CB2D-F630-393D-1BECA9C93882"
      timestamp = 1.168875486203E12
      clientId = "8A9CAB6A-41D5-E6B8-8274-266877D45B54"
      timeToLive = 0.0
      sequenceProxies = null
      sequenceSize = 3
      body = (Array #2)
        [0] = (Typed Object #3 'users.Users')
          EMAIL_ADDRESS = "[EMAIL PROTECTED]"
          USER_NAME = "ADMIN2"
        [1] = (Ref #3)
        [2] = (Ref #3)


* Here is my hibernate mapping (stripped off the DOCTYPE):

<hibernate-mapping>
    <class name="users.Users" table="ID_USER">
        <id name="id" column="USER_KEY">
            <generator class="identity"/>
        </id>
                <property name="USER_NAME"/>
                <property name="EMAIL_ADDRESS"/>
    </class>

  <query name="all.users">from Users</query>
</hibernate-mapping>

* and the corresponding FDS data-management-config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<service id="data-service" 
    class="flex.data.DataService" 
    messageTypes="flex.data.messages.DataMessage">
    <adapters>
        <adapter-definition id="actionscript" 
class="flex.data.adapters.ASObjectAdapter" default="true"/>
        <adapter-definition id="java-dao" 
class="flex.data.adapters.JavaAdapter"/>
    </adapters>
    <default-channels>
        <channel ref="my-rtmp"/>
    </default-channels>
  <destination id="users">
        <adapter ref="java-dao" />
        <properties>  
                    <use-transactions>true</use-transactions>
            <source>flex.data.assemblers.HibernateAssembler</source>
            <scope>application</scope>
            <metadata>
                <identity property="id"/>
            </metadata>
            <network>
                <paging enabled="false" pageSize="10" />
                <throttle-inbound policy="ERROR" max-frequency="500"/>
                <throttle-outbound policy="REPLACE" max-
frequency="500"/>
            </network>
            <server>
                <hibernate-entity>users.Users</hibernate-entity>
                <fill-method>
                    <name>fill</name>
                    <params>java.util.List</params>
                </fill-method>
                <fill-configuration>
                    <use-query-cache>false</use-query-cache>
                    <allow-hql-queries>true</allow-hql-queries>
                </fill-configuration>
            </server>
        </properties>
    </destination>
</service>

Thanks!
JK

Reply via email to