Archive for March 2008

Flex-Hibernate issue with named query

March 17, 2008

If you are using the HibernateAssembler, take attention in your named query. If you run into this error

Error: Unknown Property: ‘constructor’.
at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscript/flash/proxy::getProperty()
at mx.data.utils::Managed$/normalize()
at mx.data::ConcreteDataService/http://www.adobe.com/2006/flex/mx/internal::normalize()
at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processSequence()
at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processSequenceResult()
at DataListRequestResponder/result()
at mx.rpc::AsyncRequest/acknowledge()
at NetConnectionMessageResponder/resultHandler()
at mx.messaging::MessageResponder/result() 

you have to change your named query.

Do not use a named query like

 <query name=“Employee_findByUser”>
<![CDATA[
select new list(employee)
FROM Employee AS employee
WHERE employee.user.id.pid = :userIdPid
]]>
</query>

You have to make it like

<query name=“Employee_findByUser”>FROM Employee AS employee WHERE employee.user.id.pid = :userIdPid</query>

It is very hard to find this error, because you see that Hibernate fires the Select but than you get an exception in the client.

From the model to the code

March 12, 2008

How to develop a web application without any coding?

You want to create an entire application based on a 3-tier architecture with hibernate, EJB Session Beans and Struts for presentation? You can invest a large amount of cash and resources or you can make it the bright way.

You would like to know how?

Ok, I will give you the answer.

Use the MDA/MDD method and add to it a next generation development tool.

I used the eclipse based OptimalJ from Compuware.

With method and tool in place you have already solved many problems typically known in developing complex and time demanding web applications.

After modeling the domain model and defining the application architecture you will make the first transformation from a PIM – platform independent model toyour application model (PSM – platform specific model). This means that the flat structure without any application specific properties will be transformed in an application model with all the required model elements.

The process in developing an application with the MDA/MDD differs a little bit from the normal one. You have to invest more time in creating your domain model and your generators (model-to-model or model-to-code). And here is the first strength of OptimalJ. OptimalJ delivers many technology pattern (model-to-model generator) and implementation pattern (model-to-code generator). So if you do not have special requirements, you can use the default OptimalJ generators and reduce the development time over again.

 


Design a site like this with WordPress.com
Get started