adesigns / calendar-bundle

This bundle allows you to integrate the jQuery FullCalendar plugin into your Symfony2 application.
MIT License
96 stars 60 forks source link

loadEvents from database #53

Closed LuisFon87 closed 7 years ago

LuisFon87 commented 7 years ago

I did everything from readme, but I have a problem with Add events. I want to know how to connect with the database. I got this error

[Semantical Error] line 0, col 101 near 'event_datetime': Error: Class CalendarBundle\Entity\MyCompanyEvents has no field or association named event_datetime

My entity: <?php

namespace CalendarBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**

Yolo390 commented 7 years ago

The message is pretty clear...

"Error: Class CalendarBundle\Entity\MyCompanyEvents has no field or association named event_datetime"

LuisFon87 commented 7 years ago

ok but now i got an Array empty with this query

$companyEvents = $this->entityManager->getRepository('CalendarBundle:MyCompanyEvents') ->createQueryBuilder('company_events') ->where('company_events.title BETWEEN :startDate and :endDate') ->setParameter('startDate', $startDate->format('Y-m-d H:i:s')) ->setParameter('endDate', $endDate->format('Y-m-d H:i:s')) ->getQuery()->getResult();

I have this captura

and dont show nothing... where is my error? thanks

mikeyudin commented 7 years ago

You're searching on title and not a date. Closing this issue as this is no longer in scope of this bundle.

On Mon, Jan 23, 2017, 5:08 PM LuisFon87 notifications@github.com wrote:

ok but now i got an Array empty with this query

$companyEvents = $this->entityManager->getRepository('CalendarBundle:MyCompanyEvents') ->createQueryBuilder('company_events') ->where('company_events.title BETWEEN :startDate and :endDate') ->setParameter('startDate', $startDate->format('Y-m-d H:i:s')) ->setParameter('endDate', $endDate->format('Y-m-d H:i:s')) ->getQuery()->getResult();

I have this [image: captura] https://cloud.githubusercontent.com/assets/25245075/22224924/be1a77e8-e1c0-11e6-85c0-87c4a3e89ab9.JPG

and dont show nothing... where is my error? thanks

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adesigns/calendar-bundle/issues/53#issuecomment-274633318, or mute the thread https://github.com/notifications/unsubscribe-auth/AA77WLzL16MnhK2yUWLfrr6eG2XPhiGJks5rVSTkgaJpZM4LpPgL .

25RBazookas commented 7 years ago

@LuisFon87 Where do you add the events. I've managed to show the calendar but I don't find the location to add any events. A Doctrine update of my database in my project does not change a thing.