This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

Problem in auto generated Model BaseClass

Discussion relating to version 1.2.x stable

Problem in auto generated Model BaseClass

by josephjohn » Fri Feb 03, 2012 8:34 am

Hi

I am getting this error.

Fatal error: Cannot redeclare BasePlaylistMedia::getMedia() in /home/joseph/www/iuniv_asp/lib/model/om/BasePlaylistMedia.php on line 1481

I have a similar problem like this

http://forum.symfony-project.org/viewtopic.php?f=14&t=23939&p=88686&hilit=cannot+redeclare#p88686

and

http://forum.symfony-project.org/viewtopic.php?f=3&t=26204&p=96043&hilit=cannot+redeclare#p96043

This is my schema structure

playlist:
_attributes: { phpName: Playlist }
id: { type: INTEGER, size: '10', primaryKey: true, autoIncrement: true, required: true, foreignTable: playlist_media, foreignReference: playlist_id, onDelete: CASCADE, onUpdate: CASCADE }
name: { type: VARCHAR, size: '50', required: false }
status: { type: TINYINT, size: '4', required: true, defaultValue: '1' }
create_date: { type: TIMESTAMP, required: false }
update_date: { type: TIMESTAMP, required: true, defaultExpression: CURRENT_TIMESTAMP }
playlist_media:
_attributes: { phpName: PlaylistMedia }
id: { type: INTEGER, size: '10', primaryKey: true, autoIncrement: true, required: true }
name: { type: VARCHAR, size: '50', required: false }
image: { type: VARCHAR, size: '255', required: false }
description: { type: LONGVARCHAR, required: false }
media_id: { type: INTEGER, size: '10', required: true, defaultValue: '', foreignTable: media, foreignReference: id, onDelete: CASCADE, onUpdate: CASCADE }
playlist_id: { type: INTEGER, size: '10', required: true, defaultValue: '', foreignTable: playlist, foreignReference: id, onDelete: CASCADE, onUpdate: CASCADE }
media_order: { type: INTEGER, size: '11', required: false }
create_date: { type: TIMESTAMP, required: false }
update_date: { type: TIMESTAMP, required: true, defaultExpression: CURRENT_TIMESTAMP }
status: { type: TINYINT, size: '4', required: true, defaultValue: '0' }
type: { type: TINYINT, size: '4', required: true, defaultValue: '0' }
_indexes: { fk_playlist_media_ref_media_by_media_id: [media], fk_playlist_media_ref_playlist_by_playlist_id: [playlist]}

Please help us if anybody know the solution for this problem.

Thanks.
josephjohn
Junior Member
 
Posts: 1
Joined: Fri Feb 03, 2012 8:17 am