⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

can i set relation between table and view in grocery crud?



rischan

rischan
  • profile picture
  • Member

Posted 07 May 2013 - 09:15 AM

I use grocery crud with oracle database,

i have problem, in my work place i have one oracle schema and not allow to access another schema, just allow for ask database view if i need some data from table in another schema.

so can i set relation between my table with database view?

 

thank you


davidoster

davidoster
  • profile picture
  • Member

Posted 12 May 2013 - 06:01 AM

Never tried it.

Are you going to use an Oracle db for your own project or another one as MySQL.

Anyway, in either way you need two (2) different databases.

This is something that Grocery CRUD doesn't support actually.

You can make relations only between tables of the same database.

Possibly you can do this by making a new CI_Model (or GC_Model) and synchronize somehow between the two (2) databases.


Abu Yousef

Abu Yousef
  • profile picture
  • Member

Posted 02 December 2015 - 17:19 PM

Just for knowing ...

You can set a relation with a view in GC ..
By adding a primary key to the view such like :

$crud->set_primary_key('primary_key','my_view');