Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Designer> Model first: auto mapping for GUID and bool
 

Pages: 1
Designer
Model first: auto mapping for GUID and bool
Page:1/1 

  Print all messages in this thread  
Poster Message
ww
User



Location:

Joined on:
01-Oct-2004 22:58:25
Posted:
67 posts
# Posted on: 10-Jul-2019 22:53:24.  
I'm using version 4.0 of the designer for this project. It was built database-first from a SQL Server database. Now I need to add Oracle support so I have to go add field mappings for every entity to Oracle tables. Auto-mapping doesn't work for GUID or bool, and I have a lot of those data types. For each one I have to manually add a field and select the TypeConverter to use. Is there some way I can tell the designer to always use CHAR(32) for GUID and number(1) for boolean and automate this?
  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
37546 posts
# Posted on: 11-Jul-2019 10:52:29.  
Not in v4.0, we added default types per target database in 5.2.

However you can get very far. You can set up a type conversion for oracle in the project settings (which uses a type converter). So for boolean, you specify string as relational model type in the type conversion and select the boolean converter. Then specify 1 as the length in the filter.

Make sure you have set 'auto-assign type converters' to true in the entity model general settings in the project.

For Guid this is the same, but instead use a different converter and specify 32 as length

THEN do automap unmapped entities (right-click entities node in project explorer). This should create the proper target tables.


Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
ww
User



Location:

Joined on:
01-Oct-2004 22:58:25
Posted:
67 posts
# Posted on: 11-Jul-2019 22:50:38.  
Thanks! I can't upgrade this application to 5.x yet, so your suggestions were helpful.

I had missed the Type Converters page in the settings. Also I missed the "Automap Unmapped Entities" command, which was the main thing I needed to save me a lot of time Regular Smiley

I tried your settings and auto-map still didn't set the type converter on the new mappings, but it at least created the database columns and mappings for these fields, which was more than it was doing before.

I had to write a program to check over the project file and make sure the table and column names were the same for both database engines, so I had that program set the type converters for me, too.
  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8076 posts
# Posted on: 12-Jul-2019 08:58:32.  
ww wrote:
I had missed the Type Converters page in the settings. Also I missed the "Automap Unmapped Entities" command, which was the main thing I needed to save me a lot of time

Good that worked

ww wrote:
I tried your settings and auto-map still didn't set the type converter on the new mappings, but it at least created the database columns and mappings for these fields, which was more than it was doing before.

You should evaluate how the rules for the type converters was created to make the auto assignation. Some times it's some rule (length for instance) that doesn't match.

ww wrote:
I had to write a program to check over the project file and make sure the table and column names were the same for both database engines, so I had that program set the type converters for me, too.

Good to know that you found a way Regular Smiley


David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.