Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » Data type and configuring to existing DB
Data type and configuring to existing DB [message #633759] Tue, 19 October 2010 09:57 Go to next message
tenor  is currently offline tenor Friend
Messages: 57
Registered: October 2010
Member
A)

Vide

http://wiki.eclipse.org/Teneo/Hibernate/ModelRelational/Tene o_Annotation_Examples#Examples_of_annotations_in_XML

Book.category: @Enumerated to force the storage of an int in the database (instead of the Teneo default of using a String).

I could not find such @Enumerated at the model, looking at Book.java or BookCategory.java. So where i will have to add such. Is custom usertype utils is recommended for datatype mapping back and forth Oracle and Hibernate.


B)

viz

<?xml version="1.0" encoding="utf-8"?>
<persistence-mapping xmlns="http://www.eclipse.org/emft/teneo"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<epackage namespace-uri=" http://www.eclipse.org/emf/teneo/hibernate/examples/extlibra ry">
<eclass name="Library">
<table name="theLibraryTable"/>
</eclass>
</epackage>
</persistence-mapping>


is this way to way configure to existing DB and table ? what should be in namespace-uri ?

If so, how it is made available to read by session?

Also, is there a standard book on EMF/Teneo/Cdo ?


Re: Data type and configuring to existing DB [message #633873 is a reply to message #633759] Tue, 19 October 2010 16:25 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33108
Registered: July 2009
Senior Member
Tenor,

Please us the eclipse.tools.emf newsgroup/forum for questions about
EMF/CDO/Teneo (and in the latter case, prefix the subject with [CDO] or
[Teneo]. More comments below.

tenor wrote:
> A)
>
> Vide
> http://wiki.eclipse.org/Teneo/Hibernate/ModelRelational/Tene o_Annotation_Examples#Examples_of_annotations_in_XML
>
>
> Book.category: @Enumerated to force the storage of an int in the
> database (instead of the Teneo default of using a String).
> I could not find such @Enumerated at the model, looking at Book.java
> or BookCategory.java. So where i will have to add such. Is custom
> usertype utils is recommended for datatype mapping back and forth
> Oracle and Hibernate.
I assume this talks about standard JPA annotations...
>
>
> B)
>
> viz
> <?xml version="1.0" encoding="utf-8"?>
> <persistence-mapping xmlns="http://www.eclipse.org/emft/teneo"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>
> <epackage
> namespace-uri=" http://www.eclipse.org/emf/teneo/hibernate/examples/extlibra ry">
>
> <eclass name="Library">
> <table name="theLibraryTable"/>
> </eclass>
> </epackage>
> </persistence-mapping>
>
>
> is this way to way configure to existing DB and table ? what should be
> in namespace-uri ?
>
> If so, how it is made available to read by session?
>
> Also, is there a standard book on EMF/Teneo/Cdo ?
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:eclipse plug-in autobuild
Next Topic:Text to Model Transformation
Goto Forum:
  


Current Time: Tue Mar 19 11:45:25 GMT 2024

Powered by FUDForum. Page generated in 0.03062 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top