Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Entity Framework creates mad bin tables? Why?

Have just started out with EF for Oracle in targeting .Net 4.0.

Have added a ADO.NET Entity Data Model to my project and imported 7 tables that are not complicated. ALL OF THESE HAVE PRIMARY KEYS.

When I look at the model diagram I have a warning message:

Error 6002: The table/view 'SDRMAN.BIN$p2oWaPic9h7gQAkKPRBwJQ==$0' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.

I can't figure it out - an it just looks CRAZY!

enter image description here

All these BIN tables. Obviously something has gone wrong here - can anyone guess as to what is going wrong here?

Cheers

like image 443
Vidar Avatar asked Feb 24 '23 15:02

Vidar


1 Answers

These "tables" are actually old dropped tables.

By default Oracle does not really drop a table when you run DROP TABLE but moves it to the "recycle bin".

You can either disable the recycle bin or simply purge it to get rid of the old ones:

To permanently delete thos tables use:

purge recyclebin;

You can disable the usage of the recycle bin for your session using:

ALTER SESSION SET recyclebin = OFF;


More details are available in the manual:
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/tables.htm#ADMIN01511

like image 80
a_horse_with_no_name Avatar answered Mar 20 '23 12:03

a_horse_with_no_name