Database First code generation issues on oracle database

Posts   
 
    
Alex.K
User
Posts: 2
Joined: 04-Nov-2020
# Posted on: 04-Nov-2020 09:23:40   

Hello,

I'm currently evaluating LLBLGen Pro. We mostly need DB first, because we mostly develop tools and interfaces for/between existing applications. We have mostly SQL Server, but the ERP system is on Oracle.

Important: we have old projects created with Devart, and we do not want do be depended on any third party library. LLBLGen Pro sounds interesting, because it can generate EF code directly without the need for a special library.

I've created a test project for an SQL Server Database and got it working fast.

However, creating a test project to access the oracle database, I had no problem connecting to the DB, but when I started the code generation, I got lots of errors.

What am I doing wrong?

Here's the log output:

Source code generator process results
Code generation tasks execution results
Code generation results for code generation task for source 'Entity Model'
Task execution log of tasks for group ''.
Task execution started on: 04-Nov-2020 00:59.15
Task group: SD.EntityFramework.Core v3 Netstandard. For database: Oracle (MS Oracle) (DE158D99-1B10-4d88-8DEA-888E7930FF40).
Task group: Generate Entity Framework Domain model with POCO entities (SD.Tasks.Base.GenericTaskGroup). For database: Oracle (MS Oracle) (DE158D99-1B10-4d88-8DEA-888E7930FF40).
Task: Generate Entity Classes (SD.Tasks.Base.ConsumeLptTemplate)
Could not find template 'SD_EF_Core_Entity'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task: Generate ValueType Classes (SD.Tasks.Base.ConsumeLptTemplate)
Could not find template 'SD_EF_Core_ValueType'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task: Generate TypedListRow Classes (SD.Tasks.Base.ConsumeLptTemplate)
Could not find template 'SD_EF_Core_TypedList'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task: Generate TypedViewRow Classes (SD.Tasks.Base.ConsumeLptTemplate)
Could not find template 'SD_EF_Core_TypedView'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task: Generate CommonEntityBase Class (SD.Tasks.Base.ConsumeLptTemplate)
Could not find template 'SD_EF_Core_CommonEntityBase'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task: Generate CommonValueTypeBase Class (SD.Tasks.Base.ConsumeLptTemplate)
Could not find template 'SD_EF_Core_CommonValueTypeBase'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task: Generate VS.NET project file (SD.Tasks.Base.GenerateVSNetProject)
Could not find template 'SD_EF_POCO_Model_VsNet'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task group: Generate Entity Framework Database specific code and code first mapping file using DbContext API and POCO entities (SD.Tasks.Base.GenericTaskGroup). For database: Oracle (MS Oracle) (DE158D99-1B10-4d88-8DEA-888E7930FF40).
Task: Generate Context Class (SD.Tasks.Base.ConsumeLptTemplate)
Could not find template 'SD_EF_Core_Context'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task: Generate app.config file (SD.Tasks.Base.ConsumeLptTemplate)
Could not find template 'SD_EF_CodeFirst_AppConfig'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task: Generate Code First ModelBuilder Class (SD.Tasks.Base.ConsumeLptTemplate)
Could not find template 'SD_EF_Core_ModelBuilder'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task: Generate VS.NET project file (SD.Tasks.Base.GenerateVSNetProject)
Could not find template 'SD_EF_POCO_Persistence_VsNet'. It is not defined in the used templatebindings or is empty. It can be it's not defined for the current database (e.g. stored procedure templates for SqlServer CE)
Task execution ended on: 04-Nov-2020 00:59.15
Code generation results for code generation task for source 'Project'
Task execution log of tasks for group ''.
Task execution started on: 04-Nov-2020 00:59.15
Task group: SD.Project.Documentation. For database: Oracle (MS Oracle) (DE158D99-1B10-4d88-8DEA-888E7930FF40).
Task group: Generate Model Documentation Site (SD.Tasks.Base.GenericTaskGroup). For database: Oracle (MS Oracle) (DE158D99-1B10-4d88-8DEA-888E7930FF40).
Task: Generate docnet.json file (SD.Tasks.Base.ConsumeLptTemplate)
Template assembly source code written to C:\Users\keckalex\AppData\Local\Temp\DE158D99-1B10-4d88-8DEA-888E7930FF40\templatesSource.cs.
Code generated for generic directive into file 'C:\Projects\!Test\TestLLBLGen\Markdown\docnet.json' successfully.
Task: Generate splash file (SD.Tasks.Base.ConsumeLptTemplate)
Code generated for generic directive into file 'C:\Projects\!Test\TestLLBLGen\Markdown\index.md' successfully.
Task: Generate general information file (SD.Tasks.Base.ConsumeLptTemplate)
Code generated for generic directive into file 'C:\Projects\!Test\TestLLBLGen\Markdown\generalinformation.md' successfully.
Task group: Generate entity model documentation (SD.Tasks.Base.GenericTaskGroup). For database: Oracle (MS Oracle) (DE158D99-1B10-4d88-8DEA-888E7930FF40).
Task: Generate entity model general information file (SD.Tasks.Base.ConsumeLptTemplate)
Code generated for generic directive into file 'C:\Projects\!Test\TestLLBLGen\Markdown\EntityModel\generalinformation.md' successfully.
Task: Generate Entity markdown files (SD.Tasks.Base.ConsumeLptTemplate)
Code generated for entity 'Acprs2.AcpMailqueue' into file 'C:\Projects\!Test\TestLLBLGen\Markdown\EntityModel\Acprs2\Entities\AcpMailqueue.md' successfully.
Code generated for entity 'Acprs2.AcpMailqueueAttachment' into file 'C:\Projects\!Test\TestLLBLGen\Markdown\EntityModel\Acprs2\Entities\AcpMailqueueAttachment.md' successfully.
Task: Generate ValueType markdown files (SD.Tasks.Base.ConsumeLptTemplate)
Task: Generate TypedList markdown files (SD.Tasks.Base.ConsumeLptTemplate)
Task: Generate TypedView markdown files (SD.Tasks.Base.ConsumeLptTemplate)
Task: Generate SPCall markdown files (SD.Tasks.Base.ConsumeLptTemplate)
Task: Generate TVF Call markdown files (SD.Tasks.Base.ConsumeLptTemplate)
Task group: Generate derived model documentation (SD.Tasks.Base.GenericTaskGroup). For database: Oracle (MS Oracle) (DE158D99-1B10-4d88-8DEA-888E7930FF40).
Task: Generate general information file (SD.Tasks.Base.ConsumeLptTemplate)
Task: Generate root derived element markdown files (SD.Tasks.Base.ConsumeLptTemplate)
Task group: Generate meta data documentation (SD.Tasks.Base.GenericTaskGroup). For database: Oracle (MS Oracle) (DE158D99-1B10-4d88-8DEA-888E7930FF40).
Task: Generate database general information files (SD.Tasks.Base.ConsumeLptTemplate)
Code generated for driver '' into file 'C:\Projects\!Test\TestLLBLGen\Markdown\Oracle_MS_Oracle\generalinformation.md' successfully.
Task: Generate catalog general information files (SD.Tasks.Base.ConsumeLptTemplate)
Code generated for catalog '' into file 'C:\Projects\!Test\TestLLBLGen\Markdown\Oracle_MS_Oracle\WORKER\generalinformation.md' successfully.
Task: Generate schema general information files (SD.Tasks.Base.ConsumeLptTemplate)
Code generated for schema '' into file 'C:\Projects\!Test\TestLLBLGen\Markdown\Oracle_MS_Oracle\WORKER\ACPRS2\generalinformation.md' successfully.
Task: Generate table information files (SD.Tasks.Base.ConsumeLptTemplate)
Code generated for table 'ACPRS2.ACP_MAILQUEUE' into file 'C:\Projects\!Test\TestLLBLGen\Markdown\Oracle_MS_Oracle\WORKER\ACPRS2\ACPMAILQUEUE.md' successfully.
Code generated for table 'ACPRS2.ACP_MAILQUEUE_ATTACHMENT' into file 'C:\Projects\!Test\TestLLBLGen\Markdown\Oracle_MS_Oracle\WORKER\ACPRS2\ACPMAILQUEUEATTACHMENT.md' successfully.
Task: Generate view information files (SD.Tasks.Base.ConsumeLptTemplate)
Task: Generate stored procedure information files (SD.Tasks.Base.ConsumeLptTemplate)
Task: Generate table valued function information files (SD.Tasks.Base.ConsumeLptTemplate)
Task execution ended on: 04-Nov-2020 00:59.17
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 04-Nov-2020 09:43:47   

We don't support Oracle for Entity Framework, we only support Oracle on our own framework and NHibernate. This might change in the future, but the moment it's not supported, which is why you get these issues.

See: https://www.llblgen.com/Pages/specifications.aspx

Frans Bouma | Lead developer LLBLGen Pro
Alex.K
User
Posts: 2
Joined: 04-Nov-2020
# Posted on: 04-Nov-2020 11:10:37   

so no plans for the near future?

the worst problem about your NHibernate support is that it always targets the full .net Framework, and not core, so we can't use it. We also want to target Linux, so full Framework is not an option.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 04-Nov-2020 14:17:01   

Alex.K wrote:

so no plans for the near future?

the worst problem about your NHibernate support is that it always targets the full .net Framework, and not core, so we can't use it. We also want to target Linux, so full Framework is not an option.

Our own framework targets .netstandard20 and fully supports oracle, so is fully usable on Linux.

EF on oracle might happen in the (near) future if Oracle gets their act together and makes their EF (Core) provider work in sync with their ADO.NET provider, but they kept on making them use distinct types for instance (returning a NUMBER(10,0) returns in an int64 through the normal OracleReader, but in their EF Core provider they map it as an int32. Just an example but there are many differences which make supporting ef core on oracle difficult. It also didn't help they kept their provider in beta for more than 2 years smile

NHibernate and .net core support in our designer likely will never happen.

Frans Bouma | Lead developer LLBLGen Pro