-->
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.  [ 2 posts ] 
Author Message
 Post subject: Reverse Engineering using custom delegate ignores foreign
PostPosted: Mon Mar 20, 2006 5:05 pm 
Newbie

Joined: Mon Mar 20, 2006 4:56 pm
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version: 3.0.5

Name and version of the database you are using: MS Sql Server 2003


We have a situation where we DO NOT want any foreign keys to be included into the mapping files. I was trying to use a customized reverse engineering strategy to get around this problem by returning a 'null' list in getForeignKeys().

public class CustomReverseEngineeringStrategy extends DelegatingReverseEngineeringStrategy
{

/**
* Default constructor
* @param arg0
*/
public CustomReverseEngineeringStrategy(ReverseEngineeringStrategy arg0) {
super(arg0);
}

/* (non-Javadoc)
* @see org.hibernate.cfg.reveng.DelegatingReverseEngineeringStrategy#getForeignKeys(org.hibernate.cfg.reveng.TableIdentifier)
*/
@Override
public List getForeignKeys(TableIdentifier arg0)
{
return null;
}


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 22, 2006 1:27 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
returning null means "do the default".

just return an empty list instead AFAIK.

_________________
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.  [ 2 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.