1

Simple question that has been driving me nuts. I am working on a project in Flashbuilder, have generated a php service. I have had to make some changes to the database. How do I get flashbuilder to recognize these changes. I have made changes to the php methods and I know how to get them to recognize that. It is just the added fields in my database, how do I get them into the php and then into the corresponding actionscript object.

Thanks

2 Answers 2

2

Every time you change the database, you have to 'refresh' the model (your PHP page). In Flex it is called a value object (VO), which is just a PHP class that represents and stores the data from the database.

When the database table changes, the VO object must also change or the new additions to the database will not accessible.

What is happening is that FlashBuilder is seeing the old version of your VO object because it has not been updated. You can write a VO manually in PHP and import it or use the FlashBuilder wizard to re-create it based on the new database tables without having to code, like you did the first time you created it.

For further information on the topic, see: http://www.flashrealtime.com/flash-builder-4-and-php-data-services/

Sign up to request clarification or add additional context in comments.

Comments

0

Are you using Value Objects?

Anyway, try to do this: 1. refresh your services in flash builder (right click -> refresh, or just hit the button) 2. right click on your service in flash builder and determine output type. This simple process will ask you the parameters that the php service needs and it will generate the new object

2 Comments

This refreshes from the php file. But it isn't in my php file, it is in my database. Is there a way to add the field into the php file so it will rebuild. Yes I am using value objects
It depends from the structure of your php file and the way it's retrieving data from the database. How do you build your value object? Maybe you're using zend amf? In that case you have to manually edit your vo file and add the new field to the class of the object.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.