-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: Improve my tools
PostPosted: Mon Jul 10, 2006 12:29 pm 
Newbie

Joined: Mon Apr 11, 2005 6:59 am
Posts: 11
Hibernate version: 3.1.3

Name and version of the database you are using: Oracle 9.2.0.5

Hi,

I try to improve tools to generate code (mappings, dao's, etc) using templates. At this moment, I need to generate some imports. Hibernate tools work's fine for the primitive types, but they dont work for classes of others packages.

Example:
public class Allergy extends AllergyBase implements java.io.Serializable {
...

a) package.Allergy
b) package.base.AllergyBase

Allergy have a missing import for the package.base.AllergyBase.

In the templates I insert ${pojo.generateImports()}

Some help, it was thankful.

Regards.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 10, 2006 3:30 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
look at the other templates. They call $pojo.importType(fqn) to handle this.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 11, 2006 9:41 am 
Newbie

Joined: Mon Apr 11, 2005 6:59 am
Posts: 11
max wrote:
look at the other templates. They call $pojo.importType(fqn) to handle this.


Hi max,
thanks for your reply. Imports from base classes they are working now.

I have one more doubt. The tools (using my templates) when they generate relations between two tables dont adding imports.

Example:
public class PrescriptionPharmBase implements java.io.Serializable {
...
private Prescription prescription;
...

import package.Prescription is missed.


Have you some suggestion to add imports?

java version: java 1.4.2

Regards.

Thanks a lot.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 11, 2006 11:01 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
report into jira with an example that doesn't work.

for me relationships works just fine.

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.