Search Results

Search found 7 results on 1 pages for 'tere'.

Page 1/1 | 1 

  • Fixtures and inheritance in Symfony

    - by Tere
    Hi! I have a database schema in Symfony like this: Persona: actAs: { Timestampable: ~ } columns: primer_nombre: { type: string(255), notnull: true } segundo_nombre: { type: string(255) } apellido: { type: string(255), notnull: true } rut: { type: string(255) } email: { type: string(255) } email2: { type: string(255) } direccion: { type: string(400) } ciudad: { type: string(255) } region: { type: string(255) } pais: { type: string(255) } telefono: { type: string(255) } telefono2: { type: string(255) } fecha_nacimiento: { type: date } Alumno: inheritance: type: concrete extends: Persona columns: comentario: { type: string(255) } estado_pago: { type: string(255) } Alumno_Beca: columns: persona_id: { type: integer, primary: true } beca_id: { type: integer, primary: true } relations: Alumno: { onDelete: CASCADE, local: persona_id, foreign: id } Beca: { onDelete: CASCADE, local: beca_id, foreign: id } Beca: columns: nombre: { type: string(255) } monto: { type: double } porcentaje: { type: double } descripcion: { type: string(5000) } As you see, "alumno" has a concrete inheritance from "persona". Now I'm trying to create fixtures for this two tables, and I can't make Doctrine to load them. It gives me this error: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (eat/alumno__beca, CONSTRAINT alumno__beca_persona_id_alumno_id FOREIGN KEY (persona_id) REFERENCES alumno (id) ON DELETE CASCADE) Does someone know how to write a fixture for a table inherited from another? Thanks!

    Read the article

  • Symfony sfPHPExcelPlugin in Linux

    - by Tere
    Hi! I'm using the PHPExcel plugin for Symfony 1.4 (sfPHPExcelPlugin) on Ubuntu (using PHP 5.10), with this code for saving the file that I am writing: // Save Excel 2007 file echo date('H:i:s') . " Write to Excel2007 format\n"; $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); $objWriter->save(str_replace('.php', '.xlsx', __FILE__)); // Echo done echo date('H:i:s') . " Done writing file.\r\n"; I am sure that the execution is reaching this part of the code, because the echo messages are shown but I am not downloading the Excel file! Could it be because I am trying it in Linux, not in Windows? Thank you!

    Read the article

  • Remote boot and login with mac and iPhone?

    - by Moshe
    I need (free) software to login to my iMac from my iPod. TeamViewer works but the iMac puts itself to sleep. Are there any programs that can turn on my iMac remotely? Alternatively, are tere any settings that I can change to keep my iMac on at all times and ensure constant availability?

    Read the article

  • Refresh browser???????????????????????????

    - by Ritz
    hello all, I am working with images and changing their sizes dynamically from the input I get from the user. when I change the size of the image first time it doesnot reflect the changes when I click the refresh the page using the browser button the change gets reflected and after that tere is no need to click the refresh button Please tell how shall I do it so that there is no need to click the refresh button of the browser ,the changes but get reflected at one shot. Thanks Ritz

    Read the article

  • strtotime() doesn't work with dd/mm/YYYY format!

    - by Syom
    I really like the strtotime() function, but the user manual doesn't give a complete description of the supported date formats. strtotime('dd/mm/YYYY') doesn't work, it works only with mm/dd/YYYY format. if i have date in dd/mm/YYYY format, ho can i convert it to YYYY-mm-dd? i can do it by using explode() function, but i think tere are better solution. Thanks

    Read the article

  • N processes and M types of processes - enter and exit cs

    - by sarit
    i was asked to write: enter function and exit function for the following case: there are N processes and M types of processes (NM) tere is a critical section in which all processes with the same type can enter. for example: if type A is in cs, type B cannot enter cs. but all processes with type A can enter. i can use only mutex and "type" which is the type of the process. deadlock is not allowed. do you think this is ok? shared: this.type = -1; mutex m, m1=1; enter{ down(m) if (this.type == process.type) up(m1) down(m1) this.type= process.type up(m) } exit { this.type = -1 up(m1) } thanks! (by the way, this is not HW... i have an exam and im solvig tests from previous years)

    Read the article

  • Why does ActiveMQ hold messages that should be deleted from Topic?

    - by rauch
    I use ActiveMQ as Notification System(Pub/Sub model). On server: if any changes of data occur, Server send this updated data (File) to Topic using BlobMessages. There are few Clients, that subscribe on this Topic and get updated File if it exsist in Topic. The problem is that all of BlobMessages, that were sent to Topic, are hold by ActiveMQ all time. this.producer = new ProducerTool.Builder("tcp://localhost:61616?jms.blobTransferPolicy.uploadUrl=http://localhost:8161/fileserver/", "ServerProdTopic").topic(true) .transacted(false).durable(false).timeToLive(10000L).build(); this.consumer = new ConsumerTool.Builder("tcp://localhost:61616", "ServerConsTopic").topic(true) .transacted(false).durable(false).build(); consumer.setMessageListener(this); The File is sent: connection = createConnection(); session = createSession(connection); producer = createProducer(session); BlobMessage blobMsg = ((ActiveMQSession) session).createBlobMessage(resource); blobMsg.setStringProperty("sourceName", resource.getName()); producer.send(blobMsg); if (transacted) { System.out.println("Producer Committing..."); session.commit(); } Where createProducer is: protected Connection createConnection() throws JMSException, Exception { ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(url); //connectionFactory.getBlobTransferPolicy().setUploadUrl("http://localhost:8161/fileserver/"); Connection connection = connectionFactory.createConnection(); connection.start(); ((ActiveMQConnection) connection).setCopyMessageOnSend(false); return connection; } All, that could be useful I set as need: Session.AUTO_ACKNOWLEDGE; Non-Durable Subscription; TimeToLive = 9000; JMSDeliveryMode = Non-Persistent; What I have at runtime: in ActiveMQ directory: ~/apache-activemq-5.3.0/webapps/fileserver/ tere are all File, that where delivered and not delivered to Subscribers. Why? Sometimes Server send Big Files about 1 GB....And even this Files are hold at that directory, Even after stopping Subscribers(Clients), Publisher(Server) and ActiveMQ Broker.

    Read the article

1